CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TriggerDQMBase.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Trigger_TriggerDQMBase_h
2 #define DQMOffline_Trigger_TriggerDQMBase_h
3 
7 
9 public:
12 
13  TriggerDQMBase() = default;
14  virtual ~TriggerDQMBase() = default;
15 
16  struct MEbinning {
18  double xmin;
19  double xmax;
20  };
21 
22  class ObjME {
23  public:
24  ObjME() {}
25  virtual ~ObjME() {}
26 
29 
30  template <typename... Args>
31  void fill(const bool pass_num, Args... args);
32  };
33 
34  void setMETitle(ObjME& me, const std::string& titleX, const std::string& titleY);
35 
37  ObjME& me,
38  const std::string& histname,
39  const std::string& histtitle,
40  const uint nbins,
41  const double xmin,
42  const double xmax,
43  const bool bookDen = true);
45  ObjME& me,
46  const std::string& histname,
47  const std::string& histtitle,
48  const std::vector<double>& binningX,
49  const bool bookDen = true);
51  ObjME& me,
52  const std::string& histname,
53  const std::string& histtitle,
54  const uint nbinsX,
55  const double xmin,
56  const double xmax,
57  const double ymin,
58  const double ymax,
59  const bool bookDen = true);
61  ObjME& me,
62  const std::string& histname,
63  const std::string& histtitle,
64  const uint nbinsX,
65  const double xmin,
66  const double xmax,
67  const uint nbinsY,
68  const double ymin,
69  const double ymax,
70  const bool bookDen = true);
72  ObjME& me,
73  const std::string& histname,
74  const std::string& histtitle,
75  const std::vector<double>& binningX,
76  const std::vector<double>& binningY,
77  const bool bookDen = true);
78 
81 
84 };
85 
86 template <typename... Args>
87 void TriggerDQMBase::ObjME::fill(const bool fill_num, Args... args) {
88  if (denominator) {
89  denominator->Fill(args...);
90  }
91 
92  if (fill_num and numerator) {
93  numerator->Fill(args...);
94  }
95 }
96 
97 #endif // DQMOffline_Trigger_TriggerDQMBase_h
TriggerDQMBase()=default
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
virtual ~TriggerDQMBase()=default
dqm::legacy::MonitorElement MonitorElement
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
void Fill(long long x)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
MonitorElement * numerator
void fill(const bool pass_num, Args...args)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
dqm::legacy::DQMStore DQMStore