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 {
5  me.numerator->setAxisTitle(titleX,1);
6  me.numerator->setAxisTitle(titleY,2);
7  me.denominator->setAxisTitle(titleX,1);
8  me.denominator->setAxisTitle(titleY,2);
9 
10 }
11 
12 void TriggerDQMBase::bookME(DQMStore::IBooker &ibooker, ObjME& me, const std::string& histname, const std::string& histtitle, unsigned nbins, double min, double max)
13 {
14  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
15  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
16 }
17 void TriggerDQMBase::bookME(DQMStore::IBooker &ibooker, ObjME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binning)
18 {
19  unsigned nbins = binning.size()-1;
20  std::vector<float> fbinning(binning.begin(),binning.end());
21  float* arr = &fbinning[0];
22  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
23  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
24 }
25 void TriggerDQMBase::bookME(DQMStore::IBooker &ibooker, ObjME& me, const std::string& histname, const std::string& histtitle, unsigned nbinsX, double xmin, double xmax, double ymin, double ymax)
26 {
27  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
28  me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
29 }
30 void TriggerDQMBase::bookME(DQMStore::IBooker &ibooker, ObjME& me, const std::string& histname, const std::string& histtitle, unsigned nbinsX, double xmin, double xmax, unsigned nbinsY, double ymin, double ymax)
31 {
32  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
33  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
34 }
35 void TriggerDQMBase::bookME(DQMStore::IBooker &ibooker, ObjME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX, const std::vector<double>& binningY)
36 {
37  unsigned nbinsX = binningX.size()-1;
38  std::vector<float> fbinningX(binningX.begin(),binningX.end());
39  float* arrX = &fbinningX[0];
40  unsigned nbinsY = binningY.size()-1;
41  std::vector<float> fbinningY(binningY.begin(),binningY.end());
42  float* arrY = &fbinningY[0];
43 
44  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
45  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
46 }
47 
49 {
50  pset.add<unsigned> ( "nbins");
51  pset.add<double>( "xmin" );
52  pset.add<double>( "xmax" );
53 }
54 
56 {
57  pset.add<unsigned> ( "nbins", 2500);
58 }
59 
61 {
63  pset.getParameter<uint32_t>("nbins"),
64  pset.getParameter<double>("xmin"),
65  pset.getParameter<double>("xmax"),
66  };
67 }
68 
70 {
72  pset.getParameter<uint32_t>("nbins"),
73  0.,
74  double(pset.getParameter<uint32_t>("nbins"))
75  };
76 }
T getParameter(std::string const &) const
MonitorElement * numerator
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
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 * denominator
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
T min(T a, T b)
Definition: MathUtil.h:58
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)