CMS 3D CMS Logo

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 
14 //DQM
18 
19 namespace edab {
20  struct Empty {};
21 }
22 class ElectronDqmAnalyzerBase : public one::DQMEDAnalyzer<edm::LuminosityBlockCache<edab::Empty>>
23  {
24 
25  protected:
26 
27  explicit ElectronDqmAnalyzerBase( const edm::ParameterSet & conf ) ;
28  ~ElectronDqmAnalyzerBase() override ;
29 
30  // specific implementation of EDAnalyzer
31  void endRun( edm::Run const &, edm::EventSetup const & ) override;
32  std::shared_ptr<edab::Empty> globalBeginLuminosityBlock( edm::LuminosityBlock const &, edm::EventSetup const & ) const final ;
33  void globalEndLuminosityBlock( edm::LuminosityBlock const &, edm::EventSetup const & ) final ;
34  void dqmBeginRun( edm::Run const & , edm::EventSetup const & ) override;
35  void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
36 
37  // interface to implement in derived classes
38  void analyze( const edm::Event & e, const edm::EventSetup & c ) override {}
39 
40  // utility methods
41  bool finalStepDone() { return finalDone_ ; }
42  int verbosity() { return verbosity_ ; }
43 
44  void setBookPrefix( const std::string & ) ;
45  void setBookIndex( short ) ;
46  void setBookEfficiencyFlag( const bool & ) ;
47  void setBookStatOverflowFlag ( const bool & ) ;
48 
49  MonitorElement * bookH1
50  ( DQMStore::IBooker & , 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 
55  MonitorElement * bookH1withSumw2
56  ( DQMStore::IBooker & , const std::string & name, const std::string & title,
57  int nchX, double lowX, double highX,
58  const std::string & titleX ="", const std::string & titleY ="Events",
59  Option_t * option = "E1 P" ) ;
60 
61  MonitorElement * bookH2
62  ( DQMStore::IBooker & , const std::string & name, const std::string & title,
63  int nchX, double lowX, double highX,
64  int nchY, double lowY, double highY,
65  const std::string & titleX ="", const std::string & titleY ="",
66  Option_t * option = "COLZ" ) ;
67 
68  MonitorElement * bookH2withSumw2
69  ( DQMStore::IBooker & , const std::string & name, const std::string & title,
70  int nchX, double lowX, double highX,
71  int nchY, double lowY, double highY,
72  const std::string & titleX ="", const std::string & titleY ="",
73  Option_t * option = "COLZ" ) ;
74 
75  MonitorElement * bookP1
76  ( DQMStore::IBooker & , const std::string & name, const std::string & title,
77  int nchX, double lowX, double highX,
78  double lowY, double highY,
79  const std::string & titleX ="", const std::string & titleY ="",
80  Option_t * option = "E1 P" ) ;
81 
82  MonitorElement * cloneH1
83  ( DQMStore::IBooker & iBooker, const std::string & name, MonitorElement * original,
84  const std::string & title ="" ) ;
85 
86  MonitorElement * cloneH1
87  ( DQMStore::IBooker & iBooker, const std::string & name, const std::string & original,
88  const std::string & title ="" ) ;
89 
90  private:
91 
92  int verbosity_ ;
94  short bookIndex_ ;
95  bool bookEfficiencyFlag_ = false;
96  bool bookStatOverflowFlag_ = false;
98  std::vector<std::string> histoNames_ ;
104  bool finalDone_ ;
105 
106  // utility methods
107  std::string newName( const std::string & name ) ;
108  } ;
109 
110 #endif
111 
112 
113 
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
string newName
Definition: mps_merge.py:85
void analyze(const edm::Event &e, const edm::EventSetup &c) override
std::vector< std::string > histoNames_
Definition: Run.h:44