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 #include "FWCore/Utilities/interface/typedefs.h" 00034 00035 // forward declarations 00036 class L1GtfeWord; 00037 class L1GtfeExtWord; 00038 class L1TcsWord; 00039 class L1GtFdlWord; 00040 00041 class FEDHeader; 00042 class FEDTrailer; 00043 00044 00045 // class declaration 00046 class L1GlobalTriggerEvmRawToDigi : public edm::EDProducer 00047 { 00048 00049 public: 00050 00052 explicit L1GlobalTriggerEvmRawToDigi(const edm::ParameterSet&); 00053 00055 virtual ~L1GlobalTriggerEvmRawToDigi(); 00056 00057 private: 00058 00059 virtual void beginJob(); 00060 00061 virtual void produce(edm::Event&, const edm::EventSetup&); 00062 00064 00066 void unpackHeader(const unsigned char*, FEDHeader&); 00067 00069 void unpackTrailer(const unsigned char*, FEDTrailer&); 00070 00072 void produceEmptyProducts(edm::Event&); 00073 00075 void dumpFedRawData(const unsigned char*, int, std::ostream&); 00076 00078 virtual void endJob(); 00079 00080 private: 00081 00082 L1GtfeExtWord* m_gtfeWord; 00083 L1TcsWord* m_tcsWord; 00084 L1GtFdlWord* m_gtFdlWord; 00085 00087 edm::InputTag m_evmGtInputTag; 00088 00091 int m_evmGtFedId; 00092 00094 cms_uint16_t m_activeBoardsMaskGt; 00095 00096 // number of bunch crossing to be unpacked 00097 int m_unpackBxInEvent; 00098 00101 int m_lowSkipBxInEvent; 00102 00105 int m_uppSkipBxInEvent; 00106 00108 // 00110 int m_recordLength0; 00111 00113 int m_recordLength1; 00114 00116 int m_totalBxInEvent; 00117 00118 00120 int m_bstLengthBytes; 00121 00122 private: 00123 00125 int m_verbosity; 00126 bool m_isDebugEnabled; 00127 00128 00129 00130 }; 00131 00132 #endif // EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerEvmRawToDigi_h