CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/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 HcalLogicalMap;
00023 
00024 class HcalBaseDQMonitor : public edm::EDAnalyzer
00025 {
00026 
00027 public:
00028 
00029   // Constructor
00030   HcalBaseDQMonitor(const edm::ParameterSet& ps);
00031   // Constructor with no arguments
00032  HcalBaseDQMonitor():logicalMap_(0),needLogicalMap_(false),setupDone_(false){};
00033 
00034   // Destructor
00035   virtual ~HcalBaseDQMonitor();
00036 
00037 protected:
00038 
00039   // Analyze
00040   virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00041 
00042   void getLogicalMap(const edm::EventSetup& c);
00043  
00044  // BeginJob
00045   virtual void beginJob();
00046 
00047   // BeginRun
00048   virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
00049 
00050   // Begin LumiBlock
00051   virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00052                             const edm::EventSetup& c) ;
00053 
00054   // End LumiBlock
00055   virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00056                           const edm::EventSetup& c);
00057 
00058  // EndJob
00059   virtual void endJob(void);
00060 
00061   // EndRun
00062   virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
00063 
00064   // Reset
00065   virtual void reset(void);
00066 
00067   // cleanup
00068   virtual void cleanup(void);
00069 
00070   // setup
00071   virtual void setup(void);
00072   
00073   // LumiOutOfOrder
00074   bool LumiInOrder(int lumisec);
00075 
00076   void SetupEtaPhiHists(EtaPhiHists & hh, std::string Name, std::string Units)
00077   {
00078     hh.setup(dbe_, Name, Units);
00079     return;
00080   }
00081 
00082   // IsAllowedCalibType
00083   bool IsAllowedCalibType();
00084   int currenttype_;
00085 
00086   std::vector<int> AllowedCalibTypes_;
00087   bool Online_;
00088   bool mergeRuns_;
00089   bool enableCleanup_;
00090   int debug_;
00091   std::string prefixME_;
00092   std::string subdir_;
00093 
00094   int currentLS;
00095   DQMStore* dbe_;
00096   int ievt_;
00097   int levt_; // number of events in current lumi block
00098   int tevt_; // number of events overall
00099   MonitorElement* meIevt_;
00100   MonitorElement* meTevt_;
00101   MonitorElement* meLevt_;
00102   MonitorElement* meTevtHist_;
00103 
00104   bool eventAllowed_;
00105   bool skipOutOfOrderLS_;
00106   bool makeDiagnostics_;
00107 
00108   // check that each subdetector is present
00109   bool HBpresent_, HEpresent_, HOpresent_, HFpresent_;
00110 
00111   // Define problem-tracking monitor elements -- keep here, or in the client?
00112   MonitorElement *ProblemsVsLB;
00113   MonitorElement *ProblemsVsLB_HB, *ProblemsVsLB_HE;
00114   MonitorElement *ProblemsVsLB_HO, *ProblemsVsLB_HF, *ProblemsVsLB_HBHEHF;
00115   MonitorElement* ProblemsCurrentLB;  // show problems just for this LB
00116  
00117   int NLumiBlocks_;
00118   // Store known channels to be ignored during plots of problems vs LB
00119   // store vector of vectors
00120   // index 0 = HB, 1 = HE, 2 = HF, 3 HO  (index = subdetector - 1)
00121   std::map<unsigned int, int> KnownBadCells_;
00122 
00123   HcalLogicalMap* logicalMap_;
00124   bool needLogicalMap_;
00125 
00126   int badChannelStatusMask_;
00127   private:
00128   bool setupDone_;
00129 };// class HcalBaseDQMonitor : public edm::EDAnalyzer
00130 
00131 
00132 #endif