File indexing completed on 2024-04-06 12:19:59
0001 #ifndef GlobalTrigger_L1GlobalTriggerFDL_h
0002 #define GlobalTrigger_L1GlobalTriggerFDL_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <vector>
0020
0021
0022 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
0023 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0024
0025 #include "FWCore/Framework/interface/Event.h"
0026
0027 #include "CondFormats/L1TObjects/interface/L1GtBoard.h"
0028 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0029 #include <cstdint>
0030
0031
0032 class L1GlobalTriggerReadoutRecord;
0033 class L1GlobalTriggerEvmReadoutRecord;
0034
0035 class L1GtFdlWord;
0036 class L1GlobalTriggerGTL;
0037 class L1GlobalTriggerPSB;
0038
0039
0040 class L1GlobalTriggerFDL {
0041 public:
0042
0043 L1GlobalTriggerFDL();
0044
0045
0046 virtual ~L1GlobalTriggerFDL();
0047
0048
0049 void run(edm::Event &iEvent,
0050 const std::vector<int> &prescaleFactorsAlgoTrig,
0051 const std::vector<int> &prescaleFactorsTechTrig,
0052 const std::vector<unsigned int> &triggerMaskAlgoTrig,
0053 const std::vector<unsigned int> &triggerMaskTechTrig,
0054 const std::vector<unsigned int> &triggerMaskVetoAlgoTrig,
0055 const std::vector<unsigned int> &triggerMaskVetoTechTrig,
0056 const std::vector<L1GtBoard> &boardMaps,
0057 const int totalBxInEvent,
0058 const int iBxInEvent,
0059 const unsigned int numberPhysTriggers,
0060 const unsigned int numberTechnicalTriggers,
0061 const unsigned int numberDaqPartitions,
0062 const L1GlobalTriggerGTL *ptrGTL,
0063 const L1GlobalTriggerPSB *ptrPSB,
0064 const int pfAlgoSetIndex,
0065 const int pfTechSetIndex,
0066 const bool algorithmTriggersUnprescaled,
0067 const bool algorithmTriggersUnmasked,
0068 const bool technicalTriggersUnprescaled,
0069 const bool technicalTriggersUnmasked,
0070 const bool technicalTriggersVetoUnmasked);
0071
0072
0073 void fillDaqFdlBlock(const int iBxInEvent,
0074 const uint16_t &activeBoardsGtDaq,
0075 const int recordLength0,
0076 const int recordLength1,
0077 const unsigned int altNrBxBoardDaq,
0078 const std::vector<L1GtBoard> &boardMaps,
0079 L1GlobalTriggerReadoutRecord *gtDaqReadoutRecord);
0080
0081
0082 void fillEvmFdlBlock(const int iBxInEvent,
0083 const uint16_t &activeBoardsGtEvm,
0084 const int recordLength0,
0085 const int recordLength1,
0086 const unsigned int altNrBxBoardEvm,
0087 const std::vector<L1GtBoard> &boardMaps,
0088 L1GlobalTriggerEvmReadoutRecord *gtEvmReadoutRecord);
0089
0090
0091 void reset();
0092
0093
0094 inline L1GtFdlWord *gtFdlWord() const { return m_gtFdlWord; }
0095
0096 public:
0097 inline void setVerbosity(const int verbosity) { m_verbosity = verbosity; }
0098
0099 private:
0100 L1GtFdlWord *m_gtFdlWord;
0101
0102
0103 std::vector<std::vector<int>> m_prescaleCounterAlgoTrig;
0104
0105
0106 std::vector<std::vector<int>> m_prescaleCounterTechTrig;
0107
0108
0109
0110
0111
0112 bool m_firstEv;
0113 bool m_firstEvLumiSegment;
0114 bool m_firstEvRun;
0115
0116 private:
0117
0118 int m_verbosity;
0119 bool m_isDebugEnabled;
0120 };
0121
0122 #endif