Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:27

0001 #ifndef TRIGGER_TRIGGERANALYZER_H
0002 #define TRIGGER_TRIGGERANALYZER_H
0003 
0004 #include <cstdint>
0005 #include <string>
0006 
0007 class Gl1Packet;
0008 class LL1Out;
0009 class PHCompositeNode;
0010 class TriggerRunInfo;
0011 
0012 class TriggerAnalyzer
0013 {
0014  public:
0015   TriggerAnalyzer() = default;
0016   ~TriggerAnalyzer() = default;
0017 
0018   int decodeTriggers(PHCompositeNode* topNode);
0019 
0020   bool didTriggerFire(const std::string& triggername);
0021   bool didTriggerFire(int triggerbit) const;
0022 
0023   bool checkRawTrigger(const std::string& triggername);
0024   bool checkRawTrigger(int triggerbit) const;
0025 
0026   int getTriggerPrescale(const std::string& triggername);
0027   int getTriggerPrescale(int triggerbit);
0028 
0029   std::string getTriggerName(int triggerbit);
0030 
0031   uint64_t getTriggerRawScalers(const std::string& triggername);
0032   uint64_t getTriggerRawScalers(int triggerbit);
0033 
0034   uint64_t getTriggerLiveScalers(const std::string& triggername);
0035   uint64_t getTriggerLiveScalers(int triggerbit);
0036 
0037   uint64_t getTriggerScalers(const std::string& triggername);
0038   uint64_t getTriggerScalers(int triggerbit);
0039 
0040   void UseEmulator(bool use) { m_useEmulator = use; }
0041 
0042   void Print() const;
0043 
0044  private:
0045   bool m_useEmulator{false};
0046   Gl1Packet* gl1packet{nullptr};
0047   TriggerRunInfo* triggerruninfo{nullptr};
0048   LL1Out* ll1out_photon{nullptr};
0049   LL1Out* ll1out_jet{nullptr};
0050   uint64_t gl1_scaledvec{0};
0051   uint64_t gl1_livevec{0};
0052   uint64_t gl1_bco{0};
0053 
0054   void fillTriggerVector();
0055 };
0056 
0057 #endif /* CALOTRIGGER_TRIGGERANALYZER_H */