CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_GUARD_HCALBASE_H
00002 #define DQM_HCALMONITORTASKS_GUARD_HCALBASE_H
00003 
00004 // system include files
00005 #include <memory>
00006 
00007 // user include files
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "FWCore/Framework/interface/EDAnalyzer.h"
00010 #include "FWCore/Framework/interface/ESHandle.h" // needed to grab objects
00011 
00012 #include "FWCore/Framework/interface/Event.h"
00013 #include "FWCore/Framework/interface/MakerMacros.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 #include "DQMServices/Core/interface/DQMStore.h"
00017 #include "DQMServices/Core/interface/MonitorElement.h"
00018 #include "FWCore/ServiceRegistry/interface/Service.h"
00019 
00020 #include "DQM/HcalMonitorTasks/interface/HcalEtaPhiHists.h"
00021 
00022 class HcalBaseDQMonitor : public edm::EDAnalyzer
00023 {
00024 
00025 public:
00026 
00027   // Constructor
00028   HcalBaseDQMonitor(const edm::ParameterSet& ps);
00029   // Constructor with no arguments
00030   HcalBaseDQMonitor(){};
00031 
00032   // Destructor
00033   ~HcalBaseDQMonitor();
00034 
00035 protected:
00036 
00037   // Analyze
00038   virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00039 
00040   // BeginJob
00041   virtual void beginJob();
00042 
00043   // BeginRun
00044   virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
00045 
00046   // Begin LumiBlock
00047   virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00048                             const edm::EventSetup& c) ;
00049 
00050   // End LumiBlock
00051   virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00052                           const edm::EventSetup& c);
00053 
00054  // EndJob
00055   virtual void endJob(void);
00056 
00057   // EndRun
00058   virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
00059 
00060   // Reset
00061   virtual void reset(void);
00062 
00063   // cleanup
00064   virtual void cleanup(void);
00065 
00066   // setup
00067   virtual void setup(void);
00068   
00069   // LumiOutOfOrder
00070   bool LumiInOrder(int lumisec);
00071 
00072   void SetupEtaPhiHists(EtaPhiHists & hh, std::string Name, std::string Units)
00073   {
00074     hh.setup(dbe_, Name, Units);
00075     return;
00076   }
00077 
00078   // IsAllowedCalibType
00079   bool IsAllowedCalibType();
00080   int currenttype_;
00081 
00082   std::vector<int> AllowedCalibTypes_;
00083   bool Online_;
00084   bool mergeRuns_;
00085   bool enableCleanup_;
00086   int debug_;
00087   std::string prefixME_;
00088   std::string subdir_;
00089 
00090   int currentLS;
00091   DQMStore* dbe_;
00092   int ievt_;
00093   int levt_; // number of events in current lumi block
00094   int tevt_; // number of events overall
00095   MonitorElement* meIevt_;
00096   MonitorElement* meTevt_;
00097   MonitorElement* meLevt_;
00098   MonitorElement* meTevtHist_;
00099 
00100   bool eventAllowed_;
00101   bool skipOutOfOrderLS_;
00102   bool makeDiagnostics_;
00103 
00104   // check that each subdetector is present
00105   bool HBpresent_, HEpresent_, HOpresent_, HFpresent_;
00106 
00107   // Define problem-tracking monitor elements -- keep here, or in the client?
00108   MonitorElement *ProblemsVsLB;
00109   MonitorElement *ProblemsVsLB_HB, *ProblemsVsLB_HE;
00110   MonitorElement *ProblemsVsLB_HO, *ProblemsVsLB_HF, *ProblemsVsLB_HBHEHF;
00111   MonitorElement* ProblemsCurrentLB;  // show problems just for this LB
00112  
00113   int NLumiBlocks_;
00114   // Store known channels to be ignored during plots of problems vs LB
00115   // store vector of vectors
00116   // index 0 = HB, 1 = HE, 2 = HF, 3 HO  (index = subdetector - 1)
00117   std::map<unsigned int, int> KnownBadCells_;
00118 
00119   int badChannelStatusMask_;
00120 };// class HcalBaseDQMonitor : public edm::EDAnalyzer
00121 
00122 
00123 #endif