test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ElectronDqmAnalyzerBase.h
Go to the documentation of this file.
1 
2 #ifndef ElectronDqmAnalyzerBase_h
3 #define ElectronDqmAnalyzerBase_h
4 
5 class DQMStore ;
6 class MonitorElement ;
7 
10 #include <Rtypes.h>
11 #include <string>
12 #include <vector>
13 
15  {
16 
17  protected:
18 
19  explicit ElectronDqmAnalyzerBase( const edm::ParameterSet & conf ) ;
20  virtual ~ElectronDqmAnalyzerBase() ;
21 
22  // specific implementation of EDAnalyzer
23  void beginJob() ; // prepare DQM, open input field if declared, and call book() below
24  virtual void endRun( edm::Run const &, edm::EventSetup const & ) ; // call finialize() if finalStep==AtRunEnd
25  virtual void endLuminosityBlock( edm::LuminosityBlock const &, edm::EventSetup const & ) ; // call finalize() if finalStep==AtLumiEnd
26  virtual void endJob() ; // call finalize() if if finalStep==AtJobEnd
27 
28  // interface to implement in derived classes
29  virtual void book() {}
30  virtual void analyze( const edm::Event & e, const edm::EventSetup & c ) {}
31  virtual void finalize() {}
32 
33  // utility methods
34  bool finalStepDone() { return finalDone_ ; }
35  int verbosity() { return verbosity_ ; }
36  MonitorElement * get( const std::string & name ) ;
37  void remove( const std::string & name ) ;
38  void remove_other_dirs() ;
39 
40  void setBookPrefix( const std::string & ) ;
41  void setBookIndex( short ) ;
42 
44  ( const std::string & name, const std::string & title,
45  int nchX, double lowX, double highX,
46  const std::string & titleX ="", const std::string & titleY ="Events",
47  Option_t * option = "E1 P" ) ;
48 
50  ( const std::string & name, const std::string & title,
51  int nchX, double lowX, double highX,
52  const std::string & titleX ="", const std::string & titleY ="Events",
53  Option_t * option = "E1 P" ) ;
54 
56  ( const std::string & name, const std::string & title,
57  int nchX, double lowX, double highX,
58  int nchY, double lowY, double highY,
59  const std::string & titleX ="", const std::string & titleY ="",
60  Option_t * option = "COLZ" ) ;
61 
63  ( const std::string & name, const std::string & title,
64  int nchX, double lowX, double highX,
65  int nchY, double lowY, double highY,
66  const std::string & titleX ="", const std::string & titleY ="",
67  Option_t * option = "COLZ" ) ;
68 
70  ( const std::string & name, const std::string & title,
71  int nchX, double lowX, double highX,
72  double lowY, double highY,
73  const std::string & titleX ="", const std::string & titleY ="",
74  Option_t * option = "E1 P" ) ;
75 
77  ( const std::string & name, MonitorElement * num, MonitorElement * denom,
78  const std::string & titleX, const std::string & titleY,
79  const std::string & title ="" ) ;
80 
82  ( const std::string & name, MonitorElement * num, MonitorElement * denom,
83  const std::string & titleX, const std::string & titleY,
84  const std::string & title ="" ) ;
85 
88  const std::string & title ="" ) ;
89 
91  ( MonitorElement * me2d,
92  const std::string & title ="", const std::string & titleX ="", const std::string & titleY ="",
93  Double_t minimum = -1111, Double_t maximum = -1111 ) ;
94 
96  ( MonitorElement * me2d,
97  const std::string & title ="", const std::string & titleX ="", const std::string & titleY ="",
98  Double_t minimum = -1111, Double_t maximum = -1111 ) ;
99 
101  ( const std::string & name, const std::string & num, const std::string & denom,
102  const std::string & titleX, const std::string & titleY,
103  const std::string & title ="" ) ;
104 
106  ( const std::string & name, const std::string & num, const std::string & denom,
107  const std::string & titleX, const std::string & titleY,
108  const std::string & title ="" ) ;
109 
111  ( const std::string & name, const std::string & original,
112  const std::string & title ="" ) ;
113 
115  ( const std::string & me2d,
116  const std::string & title ="", const std::string & titleX ="", const std::string & titleY ="",
117  Double_t minimum = -1111, Double_t maximum = -1111 ) ;
118 
120  ( const std::string & me2d,
121  const std::string & title ="", const std::string & titleX ="", const std::string & titleY ="",
122  Double_t minimum = -1111, Double_t maximum = -1111 ) ;
123 
124  private:
125 
128  short bookIndex_ ;
130  std::vector<std::string> histoNames_ ;
137  bool finalDone_ ;
138 
139  // utility methods
140  std::string newName( const std::string & name ) ;
141  const std::string * find( const std::string & name ) ;
142  } ;
143 
144 #endif
145 
146 
147 
MonitorElement * bookP1(const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
MonitorElement * bookH1(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
virtual void endRun(edm::Run const &, edm::EventSetup const &)
list original
Definition: definitions.py:57
MonitorElement * profileY(MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
MonitorElement * bookH1withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
const std::string * find(const std::string &name)
MonitorElement * cloneH1(const std::string &name, MonitorElement *original, const std::string &title="")
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * profileX(MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
void setBookPrefix(const std::string &)
ElectronDqmAnalyzerBase(const edm::ParameterSet &conf)
tuple conf
Definition: dbtoconf.py:185
MonitorElement * bookH2andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
std::vector< std::string > histoNames_
MonitorElement * bookH2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
MonitorElement * bookH1andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * bookH2withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
Definition: Run.h:41
std::string newName(const std::string &name)