Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-13 01:32:14

0001 #ifndef L1GtConfigProducers_L1GtPrescaleFactorsAndMasksTester_h
0002 #define L1GtConfigProducers_L1GtPrescaleFactorsAndMasksTester_h
0003 
0004 /**
0005  * \class L1GtPrescaleFactorsAndMasksTester
0006  * 
0007  * 
0008  * Description: test analyzer for L1 GT prescale factors and masks.  
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *   
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  * 
0015  *
0016  */
0017 
0018 // system include files
0019 
0020 // user include files
0021 //   base class
0022 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0023 
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 
0027 // forward declarations
0028 class L1GtPrescaleFactors;
0029 class L1GtTriggerMask;
0030 
0031 class L1GtPrescaleFactorsAlgoTrigRcd;
0032 class L1GtPrescaleFactorsTechTrigRcd;
0033 class L1GtTriggerMaskAlgoTrigRcd;
0034 class L1GtTriggerMaskTechTrigRcd;
0035 class L1GtTriggerMaskVetoAlgoTrigRcd;
0036 class L1GtTriggerMaskVetoTechTrigRcd;
0037 
0038 // class declaration
0039 class L1GtPrescaleFactorsAndMasksTester
0040     : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::WatchLuminosityBlocks> {
0041 public:
0042   // constructor
0043   explicit L1GtPrescaleFactorsAndMasksTester(const edm::ParameterSet&);
0044 
0045   struct Tokens {
0046     edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> m_l1GtPfAlgo;
0047     edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> m_l1GtPfTech;
0048     edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> m_l1GtTmAlgo;
0049     edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> m_l1GtTmTech;
0050     edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd> m_l1GtTmVetoAlgo;
0051     edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd> m_l1GtTmVetoTech;
0052   };
0053 
0054 private:
0055   /// begin run
0056   void beginRun(const edm::Run&, const edm::EventSetup&) override;
0057 
0058   /// begin luminosity block
0059   void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
0060 
0061   /// analyze
0062   void analyze(const edm::Event&, const edm::EventSetup&) override;
0063 
0064   /// end luminosity block
0065   void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
0066 
0067   /// end run
0068   void endRun(const edm::Run&, const edm::EventSetup&) override;
0069 
0070 private:
0071   /// retrieve all the relevant L1 trigger event setup records
0072   void retrieveL1EventSetup(const edm::EventSetup&, const Tokens&);
0073 
0074   /// print the requred records
0075   void printL1EventSetup();
0076 
0077 private:
0078   /// input parameters
0079 
0080   /// analyze prescale factors, trigger masks and trigger veto masks, respectively
0081   bool m_testerPrescaleFactors;
0082   bool m_testerTriggerMask;
0083   bool m_testerTriggerVetoMask;
0084 
0085   /// retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
0086   bool m_retrieveInBeginRun;
0087   bool m_retrieveInBeginLuminosityBlock;
0088   bool m_retrieveInAnalyze;
0089 
0090   /// print the records in beginRun, beginLuminosityBlock, analyze, respectively
0091   bool m_printInBeginRun;
0092   bool m_printInBeginLuminosityBlock;
0093   bool m_printInAnalyze;
0094 
0095   /// print output
0096   int m_printOutput;
0097 
0098 private:
0099   /// prescale factors
0100   const L1GtPrescaleFactors* m_l1GtPfAlgo;
0101   const L1GtPrescaleFactors* m_l1GtPfTech;
0102 
0103   /// trigger masks & veto masks
0104   const L1GtTriggerMask* m_l1GtTmAlgo;
0105   const L1GtTriggerMask* m_l1GtTmTech;
0106 
0107   const L1GtTriggerMask* m_l1GtTmVetoAlgo;
0108   const L1GtTriggerMask* m_l1GtTmVetoTech;
0109 
0110   Tokens m_run;
0111   Tokens m_lumi;
0112   Tokens m_event;
0113 };
0114 
0115 #endif /*L1GtConfigProducers_L1GtPrescaleFactorsAndMasksTester_h*/