00001 #ifndef EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerRawToDigi_h 00002 #define EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerRawToDigi_h 00003 00021 // system include files 00022 #include <memory> 00023 #include <iostream> 00024 00025 // user include files 00026 #include "FWCore/Framework/interface/Frameworkfwd.h" 00027 #include "FWCore/Framework/interface/EDProducer.h" 00028 00029 #include "FWCore/Framework/interface/Event.h" 00030 #include "FWCore/Framework/interface/MakerMacros.h" 00031 00032 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00033 #include "FWCore/ParameterSet/interface/InputTag.h" 00034 00035 // forward declarations 00036 class L1GtfeWord; 00037 class L1GtFdlWord; 00038 class L1GtPsbWord; 00039 00040 class L1MuGMTReadoutCollection; 00041 00042 class FEDHeader; 00043 class FEDTrailer; 00044 00045 class L1MuTriggerScales; 00046 class L1MuTriggerPtScale; 00047 00048 00049 // class declaration 00050 class L1GlobalTriggerRawToDigi : public edm::EDProducer 00051 { 00052 00053 public: 00054 00056 explicit L1GlobalTriggerRawToDigi(const edm::ParameterSet&); 00057 00059 virtual ~L1GlobalTriggerRawToDigi(); 00060 00061 private: 00062 00063 virtual void beginJob(); 00064 00065 virtual void produce(edm::Event&, const edm::EventSetup&); 00066 00068 00070 void unpackHeader(const unsigned char*, FEDHeader&); 00071 00076 void unpackPSB(const edm::EventSetup&, const unsigned char*, L1GtPsbWord&); 00077 00079 void unpackGMT(const unsigned char*, std::auto_ptr<L1MuGMTReadoutCollection>&,edm::Event&); 00080 00082 void unpackTrailer(const unsigned char*, FEDTrailer&); 00083 00084 00086 void dumpFedRawData(const unsigned char*, int, std::ostream&); 00087 00089 virtual void endJob(); 00090 00091 private: 00092 00093 L1GtfeWord* m_gtfeWord; 00094 L1GtPsbWord* m_gtPsbWord; 00095 L1GtFdlWord* m_gtFdlWord; 00096 00098 edm::InputTag m_daqGtInputTag; 00099 00102 int m_daqGtFedId; 00103 00105 boost::uint16_t m_activeBoardsMaskGt; 00106 00107 // number of bunch crossing to be unpacked 00108 int m_unpackBxInEvent; 00109 00112 int m_lowSkipBxInEvent; 00113 00116 int m_uppSkipBxInEvent; 00117 00119 // 00121 int m_recordLength0; 00122 00124 int m_recordLength1; 00125 00127 int m_totalBxInEvent; 00128 00129 00131 const L1MuTriggerScales* m_TriggerScales; 00132 const L1MuTriggerPtScale* m_TriggerPtScale; 00133 00134 private: 00135 00137 int m_verbosity; 00138 bool m_isDebugEnabled; 00139 00140 00141 }; 00142 00143 #endif // EventFilter_L1GlobalTriggerRawToDigi_L1GlobalTriggerRawToDigi_h