CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/L1Trigger/GlobalTrigger/interface/L1GlobalTriggerPSB.h

Go to the documentation of this file.
00001 #ifndef GlobalTrigger_L1GlobalTriggerPSB_h
00002 #define GlobalTrigger_L1GlobalTriggerPSB_h
00003 
00023 // system include files
00024 #include <vector>
00025 #include <boost/cstdint.hpp>
00026 
00027 // user include files
00028 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
00029 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
00030 #include "DataFormats/L1GlobalTrigger/interface/L1GtTechnicalTriggerRecord.h"
00031 
00032 #include "DataFormats/Common/interface/Handle.h"
00033 
00034 #include "FWCore/Framework/interface/Event.h"
00035 #include "FWCore/Utilities/interface/InputTag.h"
00036 
00037 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
00038 #include "CondFormats/L1TObjects/interface/L1GtBoard.h"
00039 #include "CondFormats/L1TObjects/interface/L1GtBoardMaps.h"
00040 
00041 
00042 // forward declarations
00043 class L1GctCand;
00044 
00045 class L1GctEmCand;
00046 class L1GctJetCand;
00047 
00048 class L1GctEtMiss;
00049 class L1GctEtTotal;
00050 class L1GctEtHad;
00051 class L1GctHtMiss;
00052 
00053 class L1GctJetCounts;
00054 class L1GctHFBitCounts;
00055 class L1GctHFRingEtSums;
00056 
00057 class L1GlobalTriggerReadoutRecord;
00058 
00059 // class declaration
00060 class L1GlobalTriggerPSB
00061 {
00062 
00063 public:
00064 
00065     // constructor
00066     L1GlobalTriggerPSB();
00067 
00068     // destructor
00069     virtual ~L1GlobalTriggerPSB();
00070 
00071 public:
00072 
00074     void init(const int nrL1NoIsoEG, const int nrL1IsoEG,
00075             const int nrL1CenJet, const int nrL1ForJet, const int nrL1TauJet,
00076             const int numberTechnicalTriggers);
00077 
00079     void receiveGctObjectData(
00080         edm::Event& iEvent,
00081         const edm::InputTag& caloGctInputTag, const int iBxInEvent,
00082         const bool receiveNoIsoEG, const int nrL1NoIsoEG,
00083         const bool receiveIsoEG, const int nrL1IsoEG,
00084         const bool receiveCenJet, const int nrL1CenJet,
00085         const bool receiveForJet, const int nrL1ForJet,
00086         const bool receiveTauJet, const int nrL1TauJet,
00087         const bool receiveETM, const bool receiveETT, const bool receiveHTT, const bool receiveHTM,
00088         const bool receiveJetCounts,
00089         const bool receiveHfBitCounts,
00090         const bool receiveHfRingEtSums);
00091 
00093     void receiveCastorData(
00094             edm::Event& iEvent, const edm::InputTag& castorInputTag, const int iBxInEvent,
00095             const bool receiveCastor, const bool readFromPsb);
00096 
00098     void receiveBptxData(edm::Event& iEvent, const edm::InputTag& bptxInputTag,
00099             const int iBxInEvent, const bool receiveBptx,
00100             const bool readFromPsb);
00101 
00103     void receiveExternalData(edm::Event& iEvent,
00104             const std::vector<edm::InputTag>&  externalInputTags,
00105             const int iBxInEvent,
00106             const bool receiveExternal, const bool readFromPsb);
00107 
00109     void receiveTechnicalTriggers(edm::Event& iEvent,
00110             const std::vector<edm::InputTag>& technicalTriggersInputTags,
00111             const int iBxInEvent,
00112             const bool receiveTechTr, const int nrL1TechTr);
00113 
00115     void fillPsbBlock(
00116         edm::Event& iEvent,
00117         const boost::uint16_t& activeBoardsGtDaq,
00118         const int recordLength0,
00119         const int recordLength1,
00120         const unsigned int altNrBxBoardDaq,
00121         const std::vector<L1GtBoard>& boardMaps,
00122         const int iBxInEvent,
00123         std::auto_ptr<L1GlobalTriggerReadoutRecord>& gtDaqReadoutRecord);
00124 
00126     void reset();
00127 
00129     void printGctObjectData(const int iBxInEvent) const;
00130 
00132     inline const std::vector<const L1GctCand*>* getCandL1NoIsoEG() const
00133     {
00134         return m_candL1NoIsoEG;
00135     }
00136 
00138     inline const std::vector<const L1GctCand*>* getCandL1IsoEG() const
00139     {
00140         return m_candL1IsoEG;
00141     }
00142 
00144     inline const std::vector<const L1GctCand*>* getCandL1CenJet() const
00145     {
00146         return m_candL1CenJet;
00147     }
00148 
00150     inline const std::vector<const L1GctCand*>* getCandL1ForJet() const
00151     {
00152         return m_candL1ForJet;
00153     }
00154 
00156     inline const std::vector<const L1GctCand*>* getCandL1TauJet() const
00157     {
00158         return m_candL1TauJet;
00159     }
00160 
00162     inline const L1GctEtMiss* getCandL1ETM() const
00163     {
00164         return m_candETM;
00165     }
00166 
00168     inline const L1GctEtTotal* getCandL1ETT() const
00169     {
00170         return m_candETT;
00171     }
00172 
00174     inline const L1GctEtHad* getCandL1HTT() const
00175     {
00176         return m_candHTT;
00177     }
00178 
00180     inline const L1GctHtMiss* getCandL1HTM() const
00181     {
00182         return m_candHTM;
00183     }
00184 
00186     inline const L1GctJetCounts* getCandL1JetCounts() const
00187     {
00188         return m_candJetCounts;
00189     }
00190 
00192     inline const L1GctHFBitCounts* getCandL1HfBitCounts() const
00193     {
00194         return m_candHfBitCounts;
00195     }
00196 
00198     inline const L1GctHFRingEtSums* getCandL1HfRingEtSums() const
00199     {
00200         return m_candHfRingEtSums;
00201     }
00202 
00204     inline const std::vector<bool>* getGtTechnicalTriggers() const
00205     {
00206         return &m_gtTechnicalTriggers;
00207     }
00208 
00209 public:
00210 
00211     inline void setVerbosity(const int verbosity) {
00212         m_verbosity = verbosity;
00213     }
00214 
00215 private:
00216 
00217     std::vector<const L1GctCand*>* m_candL1NoIsoEG;
00218     std::vector<const L1GctCand*>* m_candL1IsoEG;
00219     std::vector<const L1GctCand*>* m_candL1CenJet;
00220     std::vector<const L1GctCand*>* m_candL1ForJet;
00221     std::vector<const L1GctCand*>* m_candL1TauJet;
00222 
00223     const L1GctEtMiss*  m_candETM;
00224     const L1GctEtTotal* m_candETT;
00225     const L1GctEtHad*   m_candHTT;
00226     const L1GctHtMiss*  m_candHTM;
00227 
00228     const L1GctJetCounts* m_candJetCounts;
00229 
00230     const L1GctHFBitCounts* m_candHfBitCounts;
00231     const L1GctHFRingEtSums* m_candHfRingEtSums;
00232 
00234     std::vector<bool> m_gtTechnicalTriggers;
00235 
00236 private:
00237 
00239     int m_verbosity;
00240     bool m_isDebugEnabled;
00241 
00242 
00243 };
00244 
00245 #endif