File indexing completed on 2024-04-06 12:10:45
0001 #ifndef EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerRawToDigi_h
0002 #define EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerRawToDigi_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <memory>
0021 #include <iostream>
0022
0023
0024 #include "FWCore/Framework/interface/Frameworkfwd.h"
0025 #include "FWCore/Framework/interface/stream/EDProducer.h"
0026
0027 #include "FWCore/Framework/interface/Event.h"
0028 #include "FWCore/Framework/interface/MakerMacros.h"
0029
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 #include "FWCore/Utilities/interface/InputTag.h"
0032 #include "FWCore/Utilities/interface/typedefs.h"
0033 #include "FWCore/Utilities/interface/ESGetToken.h"
0034
0035 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
0036 #include "CondFormats/DataRecord/interface/L1MuTriggerScalesRcd.h"
0037 #include "CondFormats/L1TObjects/interface/L1MuTriggerPtScale.h"
0038 #include "CondFormats/DataRecord/interface/L1MuTriggerPtScaleRcd.h"
0039 #include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
0040 #include "CondFormats/DataRecord/interface/L1GtBoardMapsRcd.h"
0041
0042
0043 class L1GtfeWord;
0044 class L1GtFdlWord;
0045 class L1GtPsbWord;
0046
0047 class L1MuGMTReadoutCollection;
0048
0049 class FEDHeader;
0050 class FEDTrailer;
0051
0052 class L1MuTriggerScales;
0053 class L1MuTriggerPtScale;
0054
0055
0056 class L1GlobalTriggerRawToDigi : public edm::stream::EDProducer<> {
0057 public:
0058
0059 explicit L1GlobalTriggerRawToDigi(const edm::ParameterSet&);
0060
0061
0062 ~L1GlobalTriggerRawToDigi() override;
0063
0064 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0065
0066 private:
0067 void produce(edm::Event&, const edm::EventSetup&) override;
0068
0069
0070
0071
0072 void unpackHeader(const unsigned char*, FEDHeader&);
0073
0074
0075
0076
0077
0078 void unpackPSB(const edm::EventSetup&, const unsigned char*, L1GtPsbWord&);
0079
0080
0081 void unpackGMT(const unsigned char*, std::unique_ptr<L1MuGMTReadoutCollection>&, edm::Event&);
0082
0083
0084 void unpackTrailer(const unsigned char*, FEDTrailer&);
0085
0086
0087 void produceEmptyProducts(edm::Event&);
0088
0089
0090 void dumpFedRawData(const unsigned char*, int, std::ostream&);
0091
0092 private:
0093 L1GtfeWord* m_gtfeWord;
0094 L1GtPsbWord* m_gtPsbWord;
0095 L1GtFdlWord* m_gtFdlWord;
0096
0097
0098 edm::InputTag m_daqGtInputTag;
0099
0100
0101
0102 int m_daqGtFedId;
0103
0104
0105 cms_uint16_t m_activeBoardsMaskGt;
0106
0107
0108 const edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> m_trigScalesToken;
0109
0110
0111 const edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> m_trigPtScaleToken;
0112
0113
0114 const edm::ESGetToken<L1GtBoardMaps, L1GtBoardMapsRcd> m_l1GtBMToken;
0115
0116
0117 int m_unpackBxInEvent;
0118
0119
0120
0121 int m_lowSkipBxInEvent;
0122
0123
0124
0125 int m_uppSkipBxInEvent;
0126
0127
0128
0129
0130 int m_recordLength0;
0131
0132
0133 int m_recordLength1;
0134
0135
0136 int m_totalBxInEvent;
0137
0138
0139 const L1MuTriggerScales* m_TriggerScales;
0140 const L1MuTriggerPtScale* m_TriggerPtScale;
0141
0142 private:
0143
0144 int m_verbosity;
0145 bool m_isDebugEnabled;
0146 };
0147
0148 #endif