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 }
TriggerDQMBase::MEbinning
Definition: TriggerDQMBase.h:16
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
hlt_dqm_clientPB-live_cfg.nbinsX
nbinsX
Definition: hlt_dqm_clientPB-live_cfg.py:65
parallelization.uint
uint
Definition: parallelization.py:124
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
TriggerDQMBase.h
TriggerDQMBase::setMETitle
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
Definition: TriggerDQMBase.cc:3
dqm::implementation::IBooker::bookProfile
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:322
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
TriggerDQMBase::bookME
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)
Definition: TriggerDQMBase.cc:15
TriggerDQMBase::ObjME
Definition: TriggerDQMBase.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hlt_dqm_clientPB-live_cfg.nbinsY
nbinsY
Definition: hlt_dqm_clientPB-live_cfg.py:69
TriggerDQMBase::fillHistoPSetDescription
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: TriggerDQMBase.cc:108
edm::ParameterSet
Definition: ParameterSet.h:47
listHistos.binning
binning
Definition: listHistos.py:43
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TriggerDQMBase::getHistoLSPSet
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: TriggerDQMBase.cc:125
TriggerDQMBase::getHistoPSet
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: TriggerDQMBase.cc:120
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
dqm::implementation::IBooker::book2D
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:177
dqm::implementation::IBooker
Definition: DQMStore.h:43
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
TriggerDQMBase::fillHistoLSPSetDescription
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: TriggerDQMBase.cc:114
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98