Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:44

0001 #ifndef L1TDEMON_H
0002 #define L1TDEMON_H
0003 
0004 /*\class L1TDEMON
0005  *\description L1 trigger data|emulation comparison DQM interface 
0006                produces DQM monitorable elements
0007  *\author Nuno Leonardo (CERN)
0008  *\date 07.07
0009  */
0010 
0011 // system, common includes
0012 #include <memory>
0013 #include <string>
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/MakerMacros.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0020 // dqm includes
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 // l1 dataformats, d|e record includes
0023 #include "L1Trigger/HardwareValidation/interface/DEtrait.h"
0024 
0025 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0026 
0027 class L1TDEMON : public DQMEDAnalyzer {
0028 public:
0029   explicit L1TDEMON(const edm::ParameterSet&);
0030   ~L1TDEMON() override;
0031 
0032 protected:
0033   void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) override;
0034   void analyze(const edm::Event&, const edm::EventSetup&) override;
0035 
0036 private:
0037   // input d|e record
0038   edm::InputTag DEsource_;
0039   bool hasRecord_;
0040 
0041   // debug verbose level
0042   int verbose_;
0043   int verbose() { return verbose_; }
0044 
0045   // root output file name
0046   std::string histFile_;
0047 
0048   // dqm histogram folder
0049   std::string histFolder_;
0050 
0051   // dqm common
0052   bool monitorDaemon_;
0053 
0054   // running in filter farm? (use reduced set of me's)
0055   bool runInFF_;
0056 
0057   // counters
0058   int nEvt_;
0059   int deSysCount[dedefs::DEnsys];
0060   int nEvtWithSys[dedefs::DEnsys];
0061 
0062   // system status (enabled / disabled)
0063   // similar to COMPARE_COLLS HardwareValidation/L1Comparator, probably a more elegant solution
0064   // possible TODO
0065 
0066   bool m_doSys[dedefs::DEnsys];
0067 
0068   /// monitoring elements
0069 
0070   // global
0071   MonitorElement* sysrates;
0072   MonitorElement* sysncand[2];
0073   MonitorElement* errordist;
0074   MonitorElement* errortype[dedefs::DEnsys];
0075 
0076   // localization
0077   MonitorElement* etaphi[dedefs::DEnsys];
0078   MonitorElement* eta[dedefs::DEnsys];
0079   MonitorElement* phi[dedefs::DEnsys];
0080   MonitorElement* x3[dedefs::DEnsys];
0081   MonitorElement* etaData[dedefs::DEnsys];
0082   MonitorElement* phiData[dedefs::DEnsys];
0083   MonitorElement* x3Data[dedefs::DEnsys];
0084   MonitorElement* rnkData[dedefs::DEnsys];
0085 
0086   // trigger data word
0087   MonitorElement* dword[dedefs::DEnsys];
0088   MonitorElement* eword[dedefs::DEnsys];
0089   MonitorElement* deword[dedefs::DEnsys];
0090   MonitorElement* masked[dedefs::DEnsys];
0091 
0092   //define Token(-s)
0093   edm::EDGetTokenT<L1DataEmulRecord> DEsourceToken_;
0094 };
0095 
0096 #endif