Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:28

0001 #ifndef L1GlobalTrigger_L1GlobalTriggerRecord_h
0002 #define L1GlobalTrigger_L1GlobalTriggerRecord_h
0003 
0004 /**
0005  * \class L1GlobalTriggerRecord
0006  * 
0007  * 
0008  * Description: stripped-down record for L1 Global Trigger.  
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 <vector>
0020 #include <iosfwd>
0021 
0022 // user include files
0023 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0024 
0025 // forward declarations
0026 namespace edm {
0027   template <typename T>
0028   class Handle;
0029 }
0030 
0031 // class interface
0032 
0033 class L1GlobalTriggerRecord {
0034 public:
0035   /// constructors
0036   L1GlobalTriggerRecord();
0037 
0038   L1GlobalTriggerRecord(const unsigned int numberPhysTriggers, const unsigned int numberTechnicalTriggers);
0039 
0040   /// copy constructor
0041   L1GlobalTriggerRecord(const L1GlobalTriggerRecord&);
0042 
0043   /// destructor
0044   virtual ~L1GlobalTriggerRecord();
0045 
0046   /// assignment operator
0047   L1GlobalTriggerRecord& operator=(const L1GlobalTriggerRecord&);
0048 
0049   /// equal operator
0050   bool operator==(const L1GlobalTriggerRecord&) const;
0051 
0052   /// unequal operator
0053   bool operator!=(const L1GlobalTriggerRecord&) const;
0054 
0055 public:
0056   /// get Global Trigger decision, decision word and technical trigger word
0057   /// for bunch cross with L1Accept (BxInEvent = 0)
0058   inline const bool decision() const { return m_gtGlobalDecision; }
0059 
0060   inline const DecisionWord decisionWord() const { return m_gtDecisionWord; }
0061 
0062   inline const TechnicalTriggerWord technicalTriggerWord() const { return m_gtTechnicalTriggerWord; }
0063 
0064   inline const DecisionWord decisionWordBeforeMask() const { return m_gtDecisionWordBeforeMask; }
0065 
0066   inline const TechnicalTriggerWord technicalTriggerWordBeforeMask() const {
0067     return m_gtTechnicalTriggerWordBeforeMask;
0068   }
0069 
0070   /// set global decision, decision word and technical trigger word
0071   /// for bunch cross with L1Accept (BxInEvent = 0)
0072   void setDecision(const bool& dValue);
0073   void setDecisionWord(const DecisionWord& dWordValue);
0074   void setTechnicalTriggerWord(const TechnicalTriggerWord& ttWordValue);
0075 
0076   void setDecisionWordBeforeMask(const DecisionWord& dWordValue);
0077   void setTechnicalTriggerWordBeforeMask(const TechnicalTriggerWord& ttWordValue);
0078 
0079   /// get/set index of the set of prescale factors
0080 
0081   inline const unsigned int gtPrescaleFactorIndexTech() const { return m_gtPrescaleFactorIndexTech; }
0082 
0083   void setGtPrescaleFactorIndexTech(const unsigned int& gtPrescaleFactorIndexTechValue) {
0084     m_gtPrescaleFactorIndexTech = gtPrescaleFactorIndexTechValue;
0085   }
0086 
0087   inline const unsigned int gtPrescaleFactorIndexAlgo() const { return m_gtPrescaleFactorIndexAlgo; }
0088 
0089   void setGtPrescaleFactorIndexAlgo(const unsigned int& gtPrescaleFactorIndexAlgoValue) {
0090     m_gtPrescaleFactorIndexAlgo = gtPrescaleFactorIndexAlgoValue;
0091   }
0092 
0093   /// print global decision and algorithm decision word
0094   void printGtDecision(std::ostream& myCout) const;
0095 
0096   /// print technical triggers
0097   void printTechnicalTrigger(std::ostream& myCout) const;
0098 
0099   // other methods
0100 
0101   /// clear the record
0102   void reset();
0103 
0104   /// pretty print the content of a L1GlobalTriggerRecord
0105   void print(std::ostream& myCout) const;
0106 
0107   /// output stream operator
0108   friend std::ostream& operator<<(std::ostream&, const L1GlobalTriggerRecord&);
0109 
0110 private:
0111   /// global decision for L1A bunch cross
0112   bool m_gtGlobalDecision;
0113 
0114   /// algorithm decision word for L1A bunch cross
0115   DecisionWord m_gtDecisionWord;
0116 
0117   /// technical trigger word for L1A bunch cross
0118   TechnicalTriggerWord m_gtTechnicalTriggerWord;
0119 
0120   /// algorithm decision word for L1A bunch cross before applying the masks
0121   DecisionWord m_gtDecisionWordBeforeMask;
0122 
0123   /// technical trigger word for L1A bunch cross before applying the masks
0124   TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask;
0125 
0126   /// index of the set of prescale factors in the DB/EventSetup
0127   /// for algorithm triggers and technical triggers
0128   unsigned int m_gtPrescaleFactorIndexTech;
0129   unsigned int m_gtPrescaleFactorIndexAlgo;
0130 };
0131 
0132 #endif