File indexing completed on 2024-04-06 12:10:45
0001 #ifndef EventFilter_L1GlobalTriggerRawToDigi_L1GTEvmDigiToRaw_h
0002 #define EventFilter_L1GlobalTriggerRawToDigi_L1GTEvmDigiToRaw_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <memory>
0020
0021
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 #include "FWCore/Framework/interface/stream/EDProducer.h"
0024
0025 #include "FWCore/Framework/interface/Event.h"
0026 #include "FWCore/Framework/interface/MakerMacros.h"
0027
0028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0029 #include "FWCore/Utilities/interface/InputTag.h"
0030 #include "FWCore/Utilities/interface/typedefs.h"
0031 #include "FWCore/Utilities/interface/ESGetToken.h"
0032 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerEvmReadoutRecord.h"
0033 #include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
0034 #include "CondFormats/DataRecord/interface/L1GtBoardMapsRcd.h"
0035
0036
0037 class FEDRawDataCollection;
0038
0039 class L1GtfeWord;
0040 class L1GtfeExtWord;
0041 class L1TcsWord;
0042 class L1GtFdlWord;
0043
0044
0045 class L1GTEvmDigiToRaw : public edm::stream::EDProducer<> {
0046 public:
0047
0048 explicit L1GTEvmDigiToRaw(const edm::ParameterSet&);
0049
0050 private:
0051
0052 void produce(edm::Event&, const edm::EventSetup&) override;
0053
0054
0055
0056
0057 void packHeader(unsigned char*, edm::Event&);
0058
0059
0060
0061
0062 void packGTFE(const edm::EventSetup&, unsigned char*, L1GtfeExtWord&, cms_uint16_t activeBoardsGtValue);
0063
0064
0065 void packTCS(const edm::EventSetup& evSetup, unsigned char* ptrGt, L1TcsWord& tcsBlock);
0066
0067
0068 void packFDL(const edm::EventSetup&, unsigned char*, L1GtFdlWord&);
0069
0070
0071 void packTrailer(unsigned char*, unsigned char*, int);
0072
0073 private:
0074
0075
0076 int m_evmGtFedId;
0077
0078
0079 const edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> m_evmGtInputToken;
0080 const edm::InputTag m_evmGtInputTag;
0081
0082
0083 const edm::ESGetToken<L1GtBoardMaps, L1GtBoardMapsRcd> m_l1GtBMToken;
0084
0085
0086 cms_uint16_t m_activeBoardsMaskGt;
0087
0088
0089 int m_totalBxInEvent;
0090
0091
0092
0093 int m_minBxInEvent;
0094
0095
0096
0097 int m_maxBxInEvent;
0098
0099
0100 int m_bstLengthBytes;
0101
0102 private:
0103
0104 const int m_verbosity;
0105 const bool m_isDebugEnabled;
0106 };
0107
0108 #endif