Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:48

0001 #ifndef L1GlobalTrigger_L1GlobalTriggerEvmReadoutRecord_h
0002 #define L1GlobalTrigger_L1GlobalTriggerEvmReadoutRecord_h
0003 
0004 /**
0005  * \class L1GlobalTriggerEvmReadoutRecord
0006  * 
0007  * 
0008  * Description: EVM readout 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 <string>
0020 #include <vector>
0021 #include <iosfwd>
0022 
0023 // user include files
0024 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0025 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
0026 
0027 #include "DataFormats/L1GlobalTrigger/interface/L1GtfeWord.h"
0028 #include "DataFormats/L1GlobalTrigger/interface/L1GtfeExtWord.h"
0029 #include "DataFormats/L1GlobalTrigger/interface/L1TcsWord.h"
0030 #include "DataFormats/L1GlobalTrigger/interface/L1GtFdlWord.h"
0031 
0032 // forward declarations
0033 
0034 // class interface
0035 
0036 class L1GlobalTriggerEvmReadoutRecord {
0037 public:
0038   /// constructors
0039   L1GlobalTriggerEvmReadoutRecord();
0040 
0041   L1GlobalTriggerEvmReadoutRecord(int NumberBxInEvent);
0042 
0043   L1GlobalTriggerEvmReadoutRecord(const int numberBxInEvent, const int numberFdlBoards);
0044 
0045   /// copy constructor
0046   L1GlobalTriggerEvmReadoutRecord(const L1GlobalTriggerEvmReadoutRecord&);
0047 
0048   /// destructor
0049   virtual ~L1GlobalTriggerEvmReadoutRecord();
0050 
0051   /// assignment operator
0052   L1GlobalTriggerEvmReadoutRecord& operator=(const L1GlobalTriggerEvmReadoutRecord&);
0053 
0054   /// equal operator
0055   bool operator==(const L1GlobalTriggerEvmReadoutRecord&) const;
0056 
0057   /// unequal operator
0058   bool operator!=(const L1GlobalTriggerEvmReadoutRecord&) const;
0059 
0060 public:
0061   /// get Global Trigger decision and the decision word
0062   ///   overloaded w.r.t. bxInEvent argument
0063   ///   bxInEvent not given: for bunch cross with L1Accept
0064   const bool decision(int bxInEvent) const;
0065   const DecisionWord decisionWord(int bxInEvent) const;
0066 
0067   const bool decision() const;
0068   const DecisionWord decisionWord() const;
0069 
0070   /// set global decision and the decision word
0071   void setDecision(bool t, int bxInEvent);
0072   void setDecisionWord(const DecisionWord& decisionWordValue, int bxInEvent);
0073 
0074   void setDecision(bool t);
0075   void setDecisionWord(const DecisionWord& decisionWordValue);
0076 
0077   /// print global decision and algorithm decision word
0078   void printGtDecision(std::ostream& myCout, int bxInEventValue) const;
0079   void printGtDecision(std::ostream& myCout) const;
0080 
0081   /// print technical triggers
0082   void printTechnicalTrigger(std::ostream& myCout, int bxInEventValue) const;
0083   void printTechnicalTrigger(std::ostream& myCout) const;
0084 
0085   //**************************************************************************
0086   // get/set hardware-related words
0087   //
0088   // Board description: file GlobalTriggerBoardsMapper.dat // TODO xml file instead?
0089   //**************************************************************************
0090 
0091   /// get / set GTFE word (record) in the GT readout record
0092   const L1GtfeExtWord gtfeWord() const;
0093   void setGtfeWord(const L1GtfeExtWord&);
0094 
0095   /// get / set TCS word (record) in the GT readout record
0096   const L1TcsWord tcsWord() const;
0097   void setTcsWord(const L1TcsWord&);
0098 
0099   /// get the vector of L1GtFdlWord
0100   const std::vector<L1GtFdlWord> gtFdlVector() const { return m_gtFdlWord; }
0101 
0102   std::vector<L1GtFdlWord>& gtFdlVector() { return m_gtFdlWord; }
0103 
0104   /// get / set FDL word (record) in the GT readout record
0105   const L1GtFdlWord gtFdlWord(int bxInEvent) const;
0106   const L1GtFdlWord gtFdlWord() const;
0107 
0108   void setGtFdlWord(const L1GtFdlWord&, int bxInEvent);
0109   void setGtFdlWord(const L1GtFdlWord&);
0110 
0111   // other methods
0112 
0113   /// clear the record
0114   void reset();
0115 
0116   /// pretty print the content of a L1GlobalTriggerEvmReadoutRecord
0117   void print(std::ostream& myCout) const;
0118 
0119   /// output stream operator
0120   friend std::ostream& operator<<(std::ostream&, const L1GlobalTriggerEvmReadoutRecord&);
0121 
0122 private:
0123   L1GtfeExtWord m_gtfeWord;
0124   L1TcsWord m_tcsWord;
0125 
0126   std::vector<L1GtFdlWord> m_gtFdlWord;
0127 };
0128 
0129 #endif