CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/L1TMonitorClient/interface/L1TTestsSummary.h

Go to the documentation of this file.
00001 #ifndef DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENT_H
00002 #define DQM_L1TMONITORCLIENT_L1TOCCUPANCYCLIENT_H
00003 
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/Event.h"
00006 #include "FWCore/Framework/interface/MakerMacros.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include <FWCore/Framework/interface/EDAnalyzer.h>
00009 
00010 #include "DQMServices/Core/interface/DQMStore.h"
00011 #include "DQMServices/Core/interface/MonitorElement.h"
00012 #include "FWCore/Framework/interface/LuminosityBlock.h"
00013 
00014 #include <memory>
00015 #include <iostream>
00016 #include <fstream>
00017 #include <string>
00018 #include <vector>
00019 #include <map>
00020 #include <TH1F.h>
00021 #include <TH1D.h>
00022 #include <TH2F.h>
00023 #include <TF1.h>
00024 #include <TProfile2D.h>
00025 
00026 class L1TTestsSummary: public edm::EDAnalyzer {
00027 
00028   public:
00029 
00030     // Constructor
00031     L1TTestsSummary(const edm::ParameterSet& ps);
00032   
00033     // Destructor
00034     virtual ~L1TTestsSummary();
00035  
00036   protected:
00037 
00038     // Job methods
00039     void beginJob(void);
00040     void endJob();
00041 
00042     // Run methods
00043     void beginRun(const edm::Run& r, const edm::EventSetup& c);
00044     void endRun(const edm::Run& r, const edm::EventSetup& c);
00045 
00046     // Luminosity Block methods
00047     void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context);
00048     void endLuminosityBlock  (const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);       // DQM Client Diagnostic
00049 
00050     void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00051 
00052   private:
00053 
00054     DQMStore*         mDBE;        //store service
00055     edm::ParameterSet mParameters; //parameter set from python
00056 
00057     // bool
00058     bool mVerbose;             // verbose mode
00059     bool mMonitorL1TRate;      // If we are going to monitor the L1TRate Module
00060     bool mMonitorL1TSync;      // If we are going to monitor the L1TSync Module
00061     bool mMonitorL1TOccupancy; // If we are going to monitor the L1TOccupancy Module
00062 
00063     // int
00064     int binYRate,binYSync,binYOccpancy; // What bin in Y corresponds to which test in L1TSummary
00065 
00066     // string
00067     std::string mL1TRatePath;      // Path to histograms produced by L1TRate Module
00068     std::string mL1TSyncPath;      // Path to histograms produced by L1TSync Module
00069     std::string mL1TOccupancyPath; // Path to histograms produced by L1TOccupancy Module
00070 
00071     // vector
00072     std::vector<int> mProcessedLS; // Already processed Luminosity Blocks
00073 
00074     // MonitorElement
00075     MonitorElement* mL1TRateMonitor;
00076     MonitorElement* mL1TSyncMonitor;
00077     MonitorElement* mL1TOccupancyMonitor;
00078     MonitorElement* mL1TSummary;
00079     
00080   // Private Functions
00081   private:
00082 
00083     void updateL1TRateMonitor();
00084     void updateL1TSyncMonitor();
00085     void updateL1TOccupancyMonitor();
00086     void updateL1TSummary();
00087 };
00088 
00089 #endif