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 
46 public:
47  HcalBaseMonitor();
48  virtual ~HcalBaseMonitor();
49 
50  virtual void setup(const edm::ParameterSet& ps, DQMStore* dbe);
51  virtual void beginRun();
52  virtual void done();
53  virtual void clearME();
54  virtual void periodicReset();
55 
56 
57  void setVerbosity(int verb) { fVerbosity = verb; }
58  int getVerbosity() const { return fVerbosity; }
59 
60  void setDiagnostics(bool myval) { makeDiagnostics=myval;}
61  bool getDiagnostics() const { return makeDiagnostics;}
62 
63  bool vetoCell(HcalDetId& id);
64  void hideKnownBadCells();
65 
66  // Set up vectors of Monitors for individual depths
67  // 2-D histograms with eta-phi binning assumed
68  void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units);
69  void setupDepthHists2D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units);
70  void SetupEtaPhiHists(MonitorElement* &h, EtaPhiHists& hh, std::string Name, std::string Units);
71  void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units);
72 
73 
74  // Generic 2-D histograms
75  void setupDepthHists2D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units,
76  int nbinsx, int lowboundx, int highboundx,
77  int nbinsy, int lowboundy, int highboundy);
78 
79  void setupDepthHists2D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units,
80  int nbinsx, int lowboundx, int highboundx,
81  int nbinsy, int lowboundy, int highboundy);
82 
83  void setMinMaxHists2D(std::vector<MonitorElement*> &hh, double min, double max);
84 
85  // 1-D histograms
86  void setupDepthHists1D(MonitorElement* &h, std::vector<MonitorElement*> &hh, std::string Name, std::string Units, int lowbound, int highbound, int Nbins);
87  void setupDepthHists1D(std::vector<MonitorElement*> &hh, std::string Name, std::string Units, int lowbound, int highbound, int Nbins);
88  void setMinMaxHists1D(std::vector<MonitorElement*> &hh, double min, double max);
89 
90  void processEvent();
91  void beginLuminosityBlock(int lb);
92  void endLuminosityBlock();
93 
94 protected:
95  void LumiBlockUpdate(int lb);
97  bool showTiming; // controls whether to show timing diagnostic info
98  bool dump2database; // controls whether output written to file for database (will eventually write db directly)
99  int checkNevents_; // controls when histograms should be updated
100 
101  double etaMax_, etaMin_;
102  double phiMax_, phiMin_;
105 
109 
111 
112  bool makeDiagnostics; // controls whether to make diagnostic plots
113 
115  bool Online_; // tracks whether code is run online or offline
116  std::vector<std::string> badCells_; // keeps list of bad cells that should be ignored
117  std::string rootFolder_;
118  std::string baseFolder_;
119 
120  std::vector<int> AllowedCalibTypes_;
121  // Eventually, remove these -- problem cells get processed in client
124 
125  int ievt_; // number of events processed (can be reset periodically)
126  int levt_; // number of events in current luminosity block
127  int tevt_; // total # of events
128  bool LBprocessed_; // indicates that histograms have been filled for current LB
136 
137 };
138 
139 #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
#define min(a, b)
Definition: mlp_lapack.h:161
EtaPhiHists ProblemCellsByDepth
MonitorElement * meTOTALEVT_
void LumiBlockUpdate(int lb)
MonitorElement * ProblemsVsLB_HF
virtual void clearME()
const T & max(const T &a, const T &b)
MonitorElement * ProblemsVsLB
std::string rootFolder_
MonitorElement * ProblemsVsLB_HB
MonitorElement * ProblemCells
edm::CPUTimer cpu_timer
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)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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)