CMS 3D CMS Logo

TriggerDQMBase.cc
Go to the documentation of this file.
2 
3 void TriggerDQMBase::setMETitle(ObjME& me, const std::string& titleX, const std::string& titleY) {
4  if (me.numerator) {
5  me.numerator->setAxisTitle(titleX, 1);
6  me.numerator->setAxisTitle(titleY, 2);
7  }
8 
9  if (me.denominator) {
10  me.denominator->setAxisTitle(titleX, 1);
11  me.denominator->setAxisTitle(titleY, 2);
12  }
13 }
14 
16  ObjME& me,
17  const std::string& histname,
18  const std::string& histtitle,
19  const uint nbins,
20  const double min,
21  const double max,
22  const bool bookDen) {
23  me.numerator = ibooker.book1D(histname + "_numerator", histtitle + " (numerator)", nbins, min, max);
24 
25  if (bookDen) {
26  me.denominator = ibooker.book1D(histname + "_denominator", histtitle + " (denominator)", nbins, min, max);
27  }
28 }
29 
31  ObjME& me,
32  const std::string& histname,
33  const std::string& histtitle,
34  const std::vector<double>& binning,
35  const bool bookDen) {
36  uint nbins = binning.size() - 1;
37  std::vector<float> fbinning(binning.begin(), binning.end());
38  float* arr = &fbinning[0];
39 
40  me.numerator = ibooker.book1D(histname + "_numerator", histtitle + " (numerator)", nbins, arr);
41 
42  if (bookDen) {
43  me.denominator = ibooker.book1D(histname + "_denominator", histtitle + " (denominator)", nbins, arr);
44  }
45 }
46 
48  ObjME& me,
49  const std::string& histname,
50  const std::string& histtitle,
51  const uint nbinsX,
52  const double xmin,
53  const double xmax,
54  const double ymin,
55  const double ymax,
56  const bool bookDen) {
57  me.numerator =
58  ibooker.bookProfile(histname + "_numerator", histtitle + " (numerator)", nbinsX, xmin, xmax, ymin, ymax);
59 
60  if (bookDen) {
61  me.denominator =
62  ibooker.bookProfile(histname + "_denominator", histtitle + " (denominator)", nbinsX, xmin, xmax, ymin, ymax);
63  }
64 }
65 
67  ObjME& me,
68  const std::string& histname,
69  const std::string& histtitle,
70  const uint nbinsX,
71  const double xmin,
72  const double xmax,
73  const uint nbinsY,
74  const double ymin,
75  const double ymax,
76  const bool bookDen) {
77  me.numerator =
78  ibooker.book2D(histname + "_numerator", histtitle + " (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
79 
80  if (bookDen) {
81  me.denominator =
82  ibooker.book2D(histname + "_denominator", histtitle + " (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
83  }
84 }
85 
87  ObjME& me,
88  const std::string& histname,
89  const std::string& histtitle,
90  const std::vector<double>& binningX,
91  const std::vector<double>& binningY,
92  const bool bookDen) {
93  uint nbinsX = binningX.size() - 1;
94  std::vector<float> fbinningX(binningX.begin(), binningX.end());
95  float* arrX = &fbinningX[0];
96  uint nbinsY = binningY.size() - 1;
97  std::vector<float> fbinningY(binningY.begin(), binningY.end());
98  float* arrY = &fbinningY[0];
99 
100  me.numerator = ibooker.book2D(histname + "_numerator", histtitle + " (numerator)", nbinsX, arrX, nbinsY, arrY);
101 
102  if (bookDen) {
103  me.denominator =
104  ibooker.book2D(histname + "_denominator", histtitle + " (denominator)", nbinsX, arrX, nbinsY, arrY);
105  }
106 }
107 
109  pset.add<uint>("nbins");
110  pset.add<double>("xmin");
111  pset.add<double>("xmax");
112 }
113 
115  pset.add<uint>("nbins", 2500);
116  pset.add<double>("xmin", 0.);
117  pset.add<double>("xmax", 2500.);
118 }
119 
122  pset.getParameter<uint32_t>("nbins"), pset.getParameter<double>("xmin"), pset.getParameter<double>("xmax")};
123 }
124 
127  pset.getParameter<uint32_t>("nbins"), 0., double(pset.getParameter<uint32_t>("nbins"))};
128 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
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)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98