CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/TrigXMonitorClient/interface/L1ScalersClient.h

Go to the documentation of this file.
00001 // -*-c++-*-
00002 // 
00003 // Client class for L1 Scalers module.
00004 // 
00005 
00006 #ifndef L1ScalersCLIENT_H
00007 #define L1ScalersCLIENT_H
00008 
00009 #include "FWCore/Framework/interface/Frameworkfwd.h"
00010 #include "FWCore/Framework/interface/EDAnalyzer.h"
00011 
00012 #include "DQMServices/Core/interface/DQMStore.h"
00013 
00014 #include "DQMServices/Core/interface/MonitorElement.h"
00015 #include "FWCore/Utilities/interface/InputTag.h"
00016 
00017 // HARD CODE THE NUMBER OF HISTOGRAMS TO 200, LENGTH OF MONITOR to 2000 
00018 // segments
00019 #define MAX_ALGOS 140
00020 #define MAX_TT 80
00021 #define MAX_LUMI_SEG 2000
00022 
00023 class L1ScalersClient: public edm::EDAnalyzer
00024 {
00025 public:
00027   L1ScalersClient(const edm::ParameterSet& ps);
00028   
00030   virtual ~L1ScalersClient() {
00031   };
00032   
00034   void beginJob(void);
00035 
00036 //   /// Endjob
00037 //   void endJob(void);
00038   
00040   void beginRun(const edm::Run& run, const edm::EventSetup& c);
00041 
00043   void endRun(const edm::Run& run, const edm::EventSetup& c);
00044 
00045   
00048   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00049                           const edm::EventSetup& c);
00050 
00051   // unused
00052   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00053 
00054 
00055 private:
00056   DQMStore * dbe_;
00057 
00058   int nev_; // Number of events processed
00059   int nLumi_; // number of lumi blocks
00060   int currentRun_;
00061   
00062   float totAlgoPrevCount;
00063   float totTtPrevCount;
00064 
00065   unsigned long int l1AlgoScalerCounters_[MAX_ALGOS];
00066   MonitorElement *l1AlgoCurrentRate_;
00067   MonitorElement *l1AlgoRateHistories_[MAX_ALGOS]; // HARD CODE FOR NOW
00068   MonitorElement *l1AlgoCurrentRatePerAlgo_[MAX_ALGOS];
00069   MonitorElement *totalAlgoRate_;
00070   
00071   unsigned long int l1TechTrigScalerCounters_[MAX_TT];
00072   MonitorElement *l1TechTrigCurrentRate_;
00073   MonitorElement *l1TechTrigRateHistories_[MAX_TT]; // HARD CODE FOR NOW
00074   MonitorElement *l1TechTrigCurrentRatePerAlgo_[MAX_TT];
00075   MonitorElement *totalTtRate_;
00076 
00077   // this is a selected list of guys
00078   MonitorElement *selected_;
00079   MonitorElement *bxSelected_ ;
00080   std::vector<int> algoSelected_;
00081   std::vector<int> techSelected_;
00082   std::string folderName_;
00083   int numSelected_;
00084 
00085   int currentLumiBlockNumber_;
00086   bool first_algo;
00087   bool first_tt;
00088 };
00089 
00090 
00091 #endif // L1ScalersCLIENT_H