CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalBaseMonitor.h
Go to the documentation of this file.
1 #ifndef DQM_HCALMONITORTASKS_HCALBASEMONITOR_H
2 #define DQM_HCALMONITORTASKS_HCALBASEMONITOR_H
3 
4 // Define number of eta, phi bins for histogram objects
5 #define ETABINS 87
6 #define PHIBINS 72
7 
10 
18 
24 
27 
29 
30 #include "TH1F.h"
31 #include "TH2F.h"
32 #include <map>
33 
34 #include <iostream>
35 
36 // Temporary fix: Add this into base class until I figure why multiple inclusions are a problem -- Jeff, 23 May 2008
38 
44 public:
45  HcalBaseMonitor();
46  virtual ~HcalBaseMonitor();
47 
48  virtual void setup(const edm::ParameterSet& ps, DQMStore* dbe);
49  virtual void beginRun();
50  virtual void done();
51  virtual void clearME();
52  virtual void periodicReset();
53 
54 
55  void setVerbosity(int verb) { fVerbosity = verb; }
56  int getVerbosity() const { return fVerbosity; }
57 
58  void setDiagnostics(bool myval) { makeDiagnostics=myval;}
59  bool getDiagnostics() const { return makeDiagnostics;}
60 
61  bool vetoCell(HcalDetId& id);
62  void hideKnownBadCells();
63 
64  // Set up vectors of Monitors for individual depths
65  // 2-D histograms with eta-phi binning assumed
66  void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units);
67  void setupDepthHists2D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units);
69  void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units);
70 
71 
72  // Generic 2-D histograms
73  void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units,
74  int nbinsx, int lowboundx, int highboundx,
75  int nbinsy, int lowboundy, int highboundy);
76 
77  void setupDepthHists2D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units,
78  int nbinsx, int lowboundx, int highboundx,
79  int nbinsy, int lowboundy, int highboundy);
80 
81  void setMinMaxHists2D(std::vector<MonitorElement*> &hh, double min, double max);
82 
83  // 1-D histograms
84  void setupDepthHists1D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units, int lowbound, int highbound, int Nbins);
85  void setupDepthHists1D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units, int lowbound, int highbound, int Nbins);
86  void setMinMaxHists1D(std::vector<MonitorElement*> &hh, double min, double max);
87 
88  void processEvent();
89  void beginLuminosityBlock(int lb);
90  void endLuminosityBlock();
91 
92 protected:
93  void LumiBlockUpdate(int lb);
95  bool showTiming; // controls whether to show timing diagnostic info
96  bool dump2database; // controls whether output written to file for database (will eventually write db directly)
97  int checkNevents_; // controls when histograms should be updated
98 
99  double etaMax_, etaMin_;
100  double phiMax_, phiMin_;
103 
107 
109 
110  bool makeDiagnostics; // controls whether to make diagnostic plots
111 
113  bool Online_; // tracks whether code is run online or offline
114  std::vector<std::string> badCells_; // keeps list of bad cells that should be ignored
117 
118  std::vector<int> AllowedCalibTypes_;
119  // Eventually, remove these -- problem cells get processed in client
122 
123  int ievt_; // number of events processed (can be reset periodically)
124  int levt_; // number of events in current luminosity block
125  int tevt_; // total # of events
126  bool LBprocessed_; // indicates that histograms have been filled for current LB
134 
135 };
136 
137 #endif
void setupDepthHists1D(MonitorElement *&h, std::vector< MonitorElement * > &hh, std::string Name, std::string Units, int lowbound, int highbound, int Nbins)
MonitorElement * ProblemsVsLB_HE
std::vector< int > AllowedCalibTypes_
MonitorElement * ProblemsVsLB_HO
void setVerbosity(int verb)
virtual void beginRun()
MonitorElement * ProblemsVsLB_HBHEHF
EtaPhiHists ProblemCellsByDepth
MonitorElement * meTOTALEVT_
void LumiBlockUpdate(int lb)
MonitorElement * ProblemsVsLB_HF
virtual void clearME()
MonitorElement * ProblemsVsLB
std::string rootFolder_
MonitorElement * ProblemsVsLB_HB
MonitorElement * ProblemCells
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
edm::CPUTimer cpu_timer
T min(T a, T b)
Definition: MathUtil.h:58
void setupDepthHists2D(MonitorElement *&h, std::vector< MonitorElement * > &hh, std::string Name, std::string Units)
virtual void periodicReset()
std::string baseFolder_
bool getDiagnostics() const
void beginLuminosityBlock(int lb)
void setMinMaxHists1D(std::vector< MonitorElement * > &hh, double min, double max)
void setMinMaxHists2D(std::vector< MonitorElement * > &hh, double min, double max)
void SetupEtaPhiHists(MonitorElement *&h, EtaPhiHists &hh, std::string Name, std::string Units)
void setDiagnostics(bool myval)
int getVerbosity() const
virtual void done()
std::vector< std::string > badCells_
MonitorElement * meEVT_
bool vetoCell(HcalDetId &id)
virtual ~HcalBaseMonitor()
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)