Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENT_H
0002 #define DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENT_H
0003 
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/Framework/interface/MakerMacros.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 #include "DQMServices/Core/interface/DQMStore.h"
0010 #include "FWCore/Framework/interface/LuminosityBlock.h"
0011 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0012 
0013 #include <memory>
0014 #include <iostream>
0015 #include <fstream>
0016 #include <string>
0017 #include <vector>
0018 #include <map>
0019 #include <TH1F.h>
0020 #include <TH1D.h>
0021 #include <TH2F.h>
0022 #include <TF1.h>
0023 #include <TProfile2D.h>
0024 
0025 class L1TTestsSummary : public DQMEDHarvester {
0026 public:
0027   // Constructor
0028   L1TTestsSummary(const edm::ParameterSet &ps);
0029 
0030   // Destructor
0031   ~L1TTestsSummary() override;
0032 
0033 protected:
0034   void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker,
0035                              DQMStore::IGetter &igetter,
0036                              const edm::LuminosityBlock &lumiSeg,
0037                              const edm::EventSetup &c) override;  // DQM Client Diagnostic
0038 
0039   void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override;
0040   virtual void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0041 
0042 private:
0043   edm::ParameterSet mParameters;  //parameter set from python
0044 
0045   // bool
0046   bool mVerbose;              // verbose mode
0047   bool mMonitorL1TRate;       // If we are going to monitor the L1TRate Module
0048   bool mMonitorL1TSync;       // If we are going to monitor the L1TSync Module
0049   bool mMonitorL1TOccupancy;  // If we are going to monitor the L1TOccupancy Module
0050 
0051   // int
0052   int binYRate, binYSync, binYOccpancy;  // What bin in Y corresponds to which test in L1TSummary
0053 
0054   // string
0055   std::string mL1TRatePath;       // Path to histograms produced by L1TRate Module
0056   std::string mL1TSyncPath;       // Path to histograms produced by L1TSync Module
0057   std::string mL1TOccupancyPath;  // Path to histograms produced by L1TOccupancy Module
0058 
0059   // vector
0060   std::vector<int> mProcessedLS;  // Already processed Luminosity Blocks
0061 
0062   // MonitorElement
0063   MonitorElement *mL1TRateMonitor;
0064   MonitorElement *mL1TSyncMonitor;
0065   MonitorElement *mL1TOccupancyMonitor;
0066   MonitorElement *mL1TSummary;
0067 
0068   // Private Functions
0069 private:
0070   void updateL1TRateMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0071   void updateL1TSyncMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0072   void updateL1TOccupancyMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0073   void updateL1TSummary(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0074 };
0075 
0076 #endif