Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:27

0001 // -*-c++-*-
0002 //
0003 // Client class for L1 Scalers module.
0004 //
0005 
0006 #ifndef L1ScalersCLIENT_H
0007 #define L1ScalersCLIENT_H
0008 
0009 #include "FWCore/Framework/interface/EDAnalyzer.h"
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 
0014 #include "FWCore/Utilities/interface/InputTag.h"
0015 
0016 // HARD CODE THE NUMBER OF HISTOGRAMS TO 200, LENGTH OF MONITOR to 2000
0017 // segments
0018 #define MAX_ALGOS 140
0019 #define MAX_TT 80
0020 #define MAX_LUMI_SEG 2000
0021 
0022 class L1ScalersClient : public edm::EDAnalyzer {
0023 public:
0024   typedef dqm::legacy::MonitorElement MonitorElement;
0025   typedef dqm::legacy::DQMStore DQMStore;
0026 
0027   /// Constructors
0028   L1ScalersClient(const edm::ParameterSet &ps);
0029 
0030   /// Destructor
0031   ~L1ScalersClient() override{};
0032 
0033   /// BeginJob
0034   void beginJob(void) override;
0035 
0036   //   /// Endjob
0037   //   void endJob(void);
0038 
0039   /// BeginRun
0040   void beginRun(const edm::Run &run, const edm::EventSetup &c) override;
0041 
0042   /// EndRun
0043   void endRun(const edm::Run &run, const edm::EventSetup &c) override;
0044 
0045   /// End LumiBlock
0046   /// DQM Client Diagnostic should be performed here
0047   void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override;
0048 
0049   // unused
0050   void analyze(const edm::Event &e, const edm::EventSetup &c) override;
0051 
0052 private:
0053   DQMStore *dbe_;
0054 
0055   int nev_;    // Number of events processed
0056   int nLumi_;  // number of lumi blocks
0057   int currentRun_;
0058 
0059   float totAlgoPrevCount;
0060   float totTtPrevCount;
0061 
0062   unsigned long int l1AlgoScalerCounters_[MAX_ALGOS];
0063   MonitorElement *l1AlgoCurrentRate_;
0064   MonitorElement *l1AlgoRateHistories_[MAX_ALGOS];  // HARD CODE FOR NOW
0065   MonitorElement *l1AlgoCurrentRatePerAlgo_[MAX_ALGOS];
0066   MonitorElement *totalAlgoRate_;
0067 
0068   unsigned long int l1TechTrigScalerCounters_[MAX_TT];
0069   MonitorElement *l1TechTrigCurrentRate_;
0070   MonitorElement *l1TechTrigRateHistories_[MAX_TT];  // HARD CODE FOR NOW
0071   MonitorElement *l1TechTrigCurrentRatePerAlgo_[MAX_TT];
0072   MonitorElement *totalTtRate_;
0073 
0074   // this is a selected list of guys
0075   MonitorElement *selected_;
0076   MonitorElement *bxSelected_;
0077   std::vector<int> algoSelected_;
0078   std::vector<int> techSelected_;
0079   std::string folderName_;
0080   int numSelected_;
0081 
0082   int currentLumiBlockNumber_;
0083   bool first_algo;
0084   bool first_tt;
0085 };
0086 
0087 #endif  // L1ScalersCLIENT_H