Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:01

0001 #ifndef GlobalTriggerAnalyzer_L1GtTrigReportEntry_h
0002 #define GlobalTriggerAnalyzer_L1GtTrigReportEntry_h
0003 
0004 /**
0005  * \class L1GtTrigReportEntry
0006  * 
0007  * 
0008  * Description: an individual L1 GT report entry.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *   
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  * 
0015  *
0016  */
0017 
0018 // system include files
0019 #include <string>
0020 
0021 // class declaration
0022 
0023 class L1GtTrigReportEntry {
0024 public:
0025   /// constructor
0026   explicit L1GtTrigReportEntry(const std::string& menuName,
0027                                const std::string& algName,
0028                                const int prescaleFactor,
0029                                const int triggerMask,
0030                                const int daqPartition);
0031 
0032   /// destructor
0033   virtual ~L1GtTrigReportEntry();
0034 
0035 public:
0036   /// assignment operator
0037   L1GtTrigReportEntry& operator=(const L1GtTrigReportEntry&);
0038 
0039   /// equal operator
0040   bool operator==(const L1GtTrigReportEntry&) const;
0041 
0042   /// unequal operator
0043   bool operator!=(const L1GtTrigReportEntry&) const;
0044 
0045 public:
0046   /// get the trigger menu name
0047   inline const std::string gtTriggerMenuName() const { return m_triggerMenuName; }
0048 
0049   ///  get the algorithm name
0050   inline const std::string gtAlgoName() const { return m_algoName; }
0051 
0052   ///  get the prescale factor
0053   inline const int gtPrescaleFactor() const { return m_prescaleFactor; }
0054 
0055   ///  get the trigger mask
0056   inline const unsigned int gtTriggerMask() const { return m_triggerMask; }
0057 
0058   ///  get the index of the DAQ partition
0059   inline const unsigned int gtDaqPartition() const { return m_daqPartition; }
0060 
0061   ///  get the number of events accepted for this entry
0062   inline const int gtNrEventsAccept() const { return m_nrEventsAccept; }
0063 
0064   /// get the number of events rejected for this entry
0065   inline const int gtNrEventsReject() const { return m_nrEventsReject; }
0066 
0067   /// get the number of events accepted for this entry before applying the trigger masks
0068   inline const int gtNrEventsAcceptBeforeMask() const { return m_nrEventsAcceptBeforeMask; }
0069 
0070   /// get the number of events rejected for this entry before applying the trigger masks
0071   inline const int gtNrEventsRejectBeforeMask() const { return m_nrEventsRejectBeforeMask; }
0072 
0073   /// get the number of events with error for this entry
0074   inline const int gtNrEventsError() const { return m_nrEventsError; }
0075 
0076 public:
0077   /// increase # of events accepted/rejected for this entry
0078   void addValidEntry(const bool algResultAfterMask, const bool algResultBeforeMask);
0079 
0080   /// increase # of events with error
0081   void addErrorEntry();
0082 
0083 private:
0084   /// menu name
0085   std::string m_triggerMenuName;
0086 
0087   /// algorithm name
0088   std::string m_algoName;
0089 
0090   /// prescale factor
0091   int m_prescaleFactor;
0092 
0093   /// trigger mask
0094   unsigned int m_triggerMask;
0095 
0096   ///  index of the DAQ partition
0097   int m_daqPartition;
0098 
0099   /// counters
0100 
0101   /// number of events accepted for this entry
0102   int m_nrEventsAccept;
0103 
0104   /// number of events rejected for this entry
0105   int m_nrEventsReject;
0106 
0107   /// number of events accepted for this entry before applying the trigger masks
0108   int m_nrEventsAcceptBeforeMask;
0109 
0110   /// number of events rejected for this entry before applying the trigger masks
0111   int m_nrEventsRejectBeforeMask;
0112 
0113   /// number of events with error
0114   int m_nrEventsError;
0115 };
0116 
0117 #endif /*GlobalTriggerAnalyzer_L1GtTrigReportEntry_h*/