00001 #ifndef EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerEvmRawToDigi_h 00002 #define EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerEvmRawToDigi_h 00003 00020 // system include files 00021 #include <memory> 00022 #include <iostream> 00023 00024 // user include files 00025 #include "FWCore/Framework/interface/Frameworkfwd.h" 00026 #include "FWCore/Framework/interface/EDProducer.h" 00027 00028 #include "FWCore/Framework/interface/Event.h" 00029 #include "FWCore/Framework/interface/MakerMacros.h" 00030 00031 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00032 #include "FWCore/Utilities/interface/InputTag.h" 00033 00034 // forward declarations 00035 class L1GtfeWord; 00036 class L1GtfeExtWord; 00037 class L1TcsWord; 00038 class L1GtFdlWord; 00039 00040 class FEDHeader; 00041 class FEDTrailer; 00042 00043 00044 // class declaration 00045 class L1GlobalTriggerEvmRawToDigi : public edm::EDProducer 00046 { 00047 00048 public: 00049 00051 explicit L1GlobalTriggerEvmRawToDigi(const edm::ParameterSet&); 00052 00054 virtual ~L1GlobalTriggerEvmRawToDigi(); 00055 00056 private: 00057 00058 virtual void beginJob(); 00059 00060 virtual void produce(edm::Event&, const edm::EventSetup&); 00061 00063 00065 void unpackHeader(const unsigned char*, FEDHeader&); 00066 00068 void unpackTrailer(const unsigned char*, FEDTrailer&); 00069 00071 void produceEmptyProducts(edm::Event&); 00072 00074 void dumpFedRawData(const unsigned char*, int, std::ostream&); 00075 00077 virtual void endJob(); 00078 00079 private: 00080 00081 L1GtfeExtWord* m_gtfeWord; 00082 L1TcsWord* m_tcsWord; 00083 L1GtFdlWord* m_gtFdlWord; 00084 00086 edm::InputTag m_evmGtInputTag; 00087 00090 int m_evmGtFedId; 00091 00093 boost::uint16_t m_activeBoardsMaskGt; 00094 00095 // number of bunch crossing to be unpacked 00096 int m_unpackBxInEvent; 00097 00100 int m_lowSkipBxInEvent; 00101 00104 int m_uppSkipBxInEvent; 00105 00107 // 00109 int m_recordLength0; 00110 00112 int m_recordLength1; 00113 00115 int m_totalBxInEvent; 00116 00117 00119 int m_bstLengthBytes; 00120 00121 private: 00122 00124 int m_verbosity; 00125 bool m_isDebugEnabled; 00126 00127 00128 00129 }; 00130 00131 #endif // EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerEvmRawToDigi_h