CMS 3D CMS Logo

MESetEcal.cc
Go to the documentation of this file.
2 
5 
6 #include <limits>
7 #include <sstream>
8 
9 namespace ecaldqm {
11  binning::ObjectType _otype,
12  binning::BinningType _btype,
14  unsigned _logicalDimensions,
15  binning::AxisSpecs const *_xaxis /* = 0*/,
16  binning::AxisSpecs const *_yaxis /* = 0*/,
17  binning::AxisSpecs const *_zaxis /* = 0*/)
18  : MESet(_fullPath, _otype, _btype, _kind),
19  logicalDimensions_(_logicalDimensions),
20  xaxis_(_xaxis ? new binning::AxisSpecs(*_xaxis) : nullptr),
21  yaxis_(_yaxis ? new binning::AxisSpecs(*_yaxis) : nullptr),
22  zaxis_(_zaxis ? new binning::AxisSpecs(*_zaxis) : nullptr) {
23  if (btype_ == binning::kUser && ((logicalDimensions_ > 0 && !xaxis_) || (logicalDimensions_ > 1 && !yaxis_)))
24  throw_("Need axis specifications");
25  }
26 
28  : MESet(_orig),
30  xaxis_(_orig.xaxis_ ? new binning::AxisSpecs(*_orig.xaxis_) : nullptr),
31  yaxis_(_orig.yaxis_ ? new binning::AxisSpecs(*_orig.yaxis_) : nullptr),
32  zaxis_(_orig.zaxis_ ? new binning::AxisSpecs(*_orig.zaxis_) : nullptr) {}
33 
35  delete xaxis_;
36  delete yaxis_;
37  delete zaxis_;
38  }
39 
41  delete xaxis_;
42  delete yaxis_;
43  delete zaxis_;
44  xaxis_ = nullptr;
45  yaxis_ = nullptr;
46  zaxis_ = nullptr;
47 
48  MESetEcal const *pRhs(dynamic_cast<MESetEcal const *>(&_rhs));
49  if (pRhs) {
51  if (pRhs->xaxis_)
52  xaxis_ = new binning::AxisSpecs(*pRhs->xaxis_);
53  if (pRhs->yaxis_)
54  yaxis_ = new binning::AxisSpecs(*pRhs->yaxis_);
55  if (pRhs->zaxis_)
56  zaxis_ = new binning::AxisSpecs(*pRhs->zaxis_);
57  }
58  return MESet::operator=(_rhs);
59  }
60 
61  MESet *MESetEcal::clone(std::string const &_path /* = ""*/) const {
63  if (!_path.empty())
64  path_ = _path;
65  MESet *copy(new MESetEcal(*this));
66  path_ = path;
67  return copy;
68  }
69 
71  using namespace std;
72 
73  clear();
74 
75  vector<string> mePaths(generatePaths());
76 
77  for (unsigned iME(0); iME < mePaths.size(); iME++) {
78  string &path(mePaths[iME]);
79  if (path.find('%') != string::npos)
80  throw_("book() called with incompletely formed path [" + path + "]");
81 
82  binning::ObjectType actualObject(binning::getObject(otype_, iME));
83 
85 
86  bool isHistogram(logicalDimensions_ > 0);
87  bool isMap(logicalDimensions_ > 1);
88 
89  if (isHistogram) {
90  if (xaxis_)
91  xaxis = *xaxis_;
92  if (yaxis_)
93  yaxis = *yaxis_;
94  if (zaxis_)
95  zaxis = *zaxis_;
96 
97  if (xaxis.nbins == 0) { // uses preset
98  binning::AxisSpecs xdef(binning::getBinning(actualObject, btype_, isMap, 1, iME));
99  if (xaxis.labels || !xaxis.title.empty()) { // PSet specifies title / label only
100  std::string *labels(xaxis.labels);
101  std::string title(xaxis.title);
102  xaxis = xdef;
103  delete[] xaxis.labels;
104  xaxis.labels = labels;
105  xaxis.title = title;
106  } else
107  xaxis = xdef;
108  }
109 
110  if (isMap && yaxis.nbins == 0) {
111  binning::AxisSpecs ydef(binning::getBinning(actualObject, btype_, isMap, 2, iME));
112  if (yaxis.labels || !yaxis.title.empty()) { // PSet specifies title / label only
113  std::string *labels(yaxis.labels);
114  std::string title(yaxis.title);
115  yaxis = ydef;
116  delete[] yaxis.labels;
117  yaxis.labels = labels;
118  yaxis.title = title;
119  } else
120  yaxis = ydef;
121  }
122 
123  if (yaxis.high - yaxis.low < 1.e-10) {
124  yaxis.low = -numeric_limits<double>::max();
126  }
127 
128  if (zaxis.high - zaxis.low < 1.e-10) {
129  zaxis.low = -numeric_limits<double>::max();
131  }
132  }
133 
134  size_t slashPos(path.find_last_of('/'));
135  string name(path.substr(slashPos + 1));
136  _ibooker.cd();
137  _ibooker.setCurrentFolder(path.substr(0, slashPos));
138 
139  MonitorElement *me(nullptr);
140 
141  switch (kind_) {
143  me = _ibooker.bookFloat(name);
144 
145  break;
146 
148  if (xaxis.edges)
149  me = _ibooker.book1D(name, name, xaxis.nbins, xaxis.edges);
150  else
151  me = _ibooker.book1D(name, name, xaxis.nbins, xaxis.low, xaxis.high);
152 
153  break;
154 
156  if (xaxis.edges) {
157  // DQMStore bookProfile interface uses double* for bin edges
158  double *edges(new double[xaxis.nbins + 1]);
159  std::copy(xaxis.edges, xaxis.edges + xaxis.nbins + 1, edges);
160  me = _ibooker.bookProfile(name, name, xaxis.nbins, edges, yaxis.low, yaxis.high, "");
161  delete[] edges;
162  } else
163  me = _ibooker.bookProfile(name, name, xaxis.nbins, xaxis.low, xaxis.high, yaxis.low, yaxis.high, "");
164 
165  break;
166 
168  if (xaxis.edges || yaxis.edges) {
169  binning::AxisSpecs *specs[] = {&xaxis, &yaxis};
170  for (int iSpec(0); iSpec < 2; iSpec++) {
171  if (!specs[iSpec]->edges) {
172  specs[iSpec]->edges = new float[specs[iSpec]->nbins + 1];
173  int nbins(specs[iSpec]->nbins);
174  double low(specs[iSpec]->low), high(specs[iSpec]->high);
175  for (int i(0); i < nbins + 1; i++)
176  specs[iSpec]->edges[i] = low + (high - low) / nbins * i;
177  }
178  }
179  me = _ibooker.book2D(name, name, xaxis.nbins, xaxis.edges, yaxis.nbins, yaxis.edges);
180  } else
181  me = _ibooker.book2D(name, name, xaxis.nbins, xaxis.low, xaxis.high, yaxis.nbins, yaxis.low, yaxis.high);
182 
183  break;
184 
186  if (zaxis.edges) {
187  zaxis.low = zaxis.edges[0];
188  zaxis.high = zaxis.edges[zaxis.nbins];
189  }
190  if (xaxis.edges || yaxis.edges)
191  throw_("Variable bin size for 2D profile not implemented");
192  me = _ibooker.bookProfile2D(name,
193  name,
194  xaxis.nbins,
195  xaxis.low,
196  xaxis.high,
197  yaxis.nbins,
198  yaxis.low,
199  yaxis.high,
200  zaxis.low,
201  zaxis.high,
202  "");
203 
204  break;
205 
206  default:
207  break;
208  }
209 
210  if (!me)
211  throw_("ME could not be booked");
212 
213  if (isHistogram) {
214  me->setAxisTitle(xaxis.title, 1);
215  me->setAxisTitle(yaxis.title, 2);
216  if (isMap)
217  me->setAxisTitle(zaxis.title, 3);
218 
219  if (xaxis.labels) {
220  for (int iBin(1); iBin <= xaxis.nbins; ++iBin)
221  me->setBinLabel(iBin, xaxis.labels[iBin - 1], 1);
222  }
223  if (yaxis.labels) {
224  for (int iBin(1); iBin <= yaxis.nbins; ++iBin)
225  me->setBinLabel(iBin, yaxis.labels[iBin - 1], 2);
226  }
227  if (zaxis.labels) {
228  for (int iBin(1); iBin <= zaxis.nbins; ++iBin)
229  me->setBinLabel(iBin, zaxis.labels[iBin - 1], 3);
230  }
231 
232  /* FIX: In ROOT 6.0.12 bit 20 is used by ROOT (bit 19 was already in use
233  in 6.0.x). Talking with the ROOT team, users should never use SetBit for
234  their own purpose since those bits are reserved for ROOT internally. See
235  https://github.com/cms-sw/cmssw/issues/21423 for some alternative ways of
236  attaching additional information to a TH1
237 
238  // For plot tagging in RenderPlugin; default values are 1 for both
239  // bits 19 - 23 are free in TH1::fBits
240  // can only pack object + logical dimensions into 5 bits (4 bits for
241  object, 1 bit for dim (1 -> dim >= 2))
242  me->getTH1()->SetBit(uint32_t(actualObject + 1) << 20);
243  if(isMap) me->getTH1()->SetBit(0x1 << 19);
244  */
245 
246  // The render plugin requires some metadata in order to set the correct
247  // rendering for each plot. The original solution was to use bits number
248  // 19 to 23 in TH1::fBits, but these were meant for ROOT's internal usage
249  // and eventually started breaking things, see:
250  // https://github.com/cms-sw/cmssw/issues/21423 The current solution is to
251  // use the UniqueID field in the parent TObject, which is expected to work
252  // if there is no TRef pointing to the TObject.
253 
254  // To check that indeed there is no such TRef, one can use
255  // TestBit(kIsReferenced), e.g. std::cout << "Need to set unique ID at
256  // path = " << path << "; for this path, TestBit(kIsReferenced) is: " <<
257  // (me->getTH1()->TestBit(kIsReferenced)? "true": "false") << std::endl;
258  // // should always output false for the solution to work
259 
260  // Originally, bit 19 in TH1::fBits was set to isMap, while bits 20-23
261  // contained (actualObject+1). The idea is to make sure that both these
262  // variables are easily recoverable in the render plugin, as in this
263  // solution, where isMap is the last bit.
264  me->getTH1()->SetUniqueID(uint32_t(2 * (actualObject + 1) + (isMap ? 1 : 0)));
265  }
266 
267  if (lumiFlag_)
268  me->setLumiFlag();
269 
270  mes_.push_back(me);
271  }
272 
273  active_ = true;
274  }
275 
276  bool MESetEcal::retrieve(DQMStore::IGetter &_igetter, std::string *_failedPath /* = 0*/) const {
277  clear();
278 
279  std::vector<std::string> mePaths(generatePaths());
280  if (mePaths.empty()) {
281  if (_failedPath)
282  _failedPath->clear();
283  return false;
284  }
285 
286  for (unsigned iME(0); iME < mePaths.size(); iME++) {
287  std::string &path(mePaths[iME]);
288  if (path.find('%') != std::string::npos)
289  throw_("retrieve() called with incompletely formed path [" + path + "]");
290 
291  MonitorElement *me(_igetter.get(path));
292  if (me)
293  mes_.push_back(me);
294  else {
295  clear();
296  if (_failedPath)
297  *_failedPath = path;
298  return false;
299  }
300  }
301 
302  active_ = true;
303  return true;
304  }
305 
306  void MESetEcal::fill(DetId const &_id, double _x /* = 1.*/, double _wy /* = 1.*/, double _w /* = 1.*/) {
307  if (!active_)
308  return;
309 
310  unsigned iME(binning::findPlotIndex(otype_, _id));
311  checkME_(iME);
312 
313  fill_(iME, _x, _wy, _w);
314  }
315 
316  void MESetEcal::fill(EcalElectronicsId const &_id, double _x /* = 1.*/, double _wy /* = 1.*/, double _w /* = 1.*/) {
317  if (!active_)
318  return;
319 
320  unsigned iME(binning::findPlotIndex(otype_, _id));
321  checkME_(iME);
322 
323  fill_(iME, _x, _wy, _w);
324  }
325 
326  void MESetEcal::fill(int _dcctccid, double _x /* = 1.*/, double _wy /* = 1.*/, double _w /* = 1.*/) {
327  if (!active_)
328  return;
329 
330  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
331  checkME_(iME);
332 
333  fill_(iME, _x, _wy, _w);
334  }
335 
336  void MESetEcal::fill(double _x, double _wy /* = 1.*/, double _w /* = 1.*/) {
337  if (!active_)
338  return;
339 
340  if (mes_.size() != 1)
341  return;
342 
343  fill_(0, _x, _wy, _w);
344  }
345 
346  void MESetEcal::setBinContent(DetId const &_id, int _bin, double _content) {
347  if (!active_)
348  return;
349 
350  unsigned iME(binning::findPlotIndex(otype_, _id));
351  checkME_(iME);
352 
353  mes_[iME]->setBinContent(_bin, _content);
354  }
355 
356  void MESetEcal::setBinContent(EcalElectronicsId const &_id, int _bin, double _content) {
357  if (!active_)
358  return;
359 
360  unsigned iME(binning::findPlotIndex(otype_, _id));
361  checkME_(iME);
362 
363  mes_[iME]->setBinContent(_bin, _content);
364  }
365 
366  void MESetEcal::setBinContent(int _dcctccid, int _bin, double _content) {
367  if (!active_)
368  return;
369 
370  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
371  checkME_(iME);
372 
373  mes_[iME]->setBinContent(_bin, _content);
374  }
375 
376  void MESetEcal::setBinError(DetId const &_id, int _bin, double _error) {
377  if (!active_)
378  return;
379 
380  unsigned iME(binning::findPlotIndex(otype_, _id));
381  checkME_(iME);
382 
383  mes_[iME]->setBinError(_bin, _error);
384  }
385 
386  void MESetEcal::setBinError(EcalElectronicsId const &_id, int _bin, double _error) {
387  if (!active_)
388  return;
389 
390  unsigned iME(binning::findPlotIndex(otype_, _id));
391  checkME_(iME);
392 
393  mes_[iME]->setBinError(_bin, _error);
394  }
395 
396  void MESetEcal::setBinError(int _dcctccid, int _bin, double _error) {
397  if (!active_)
398  return;
399 
400  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
401  checkME_(iME);
402 
403  mes_[iME]->setBinError(_bin, _error);
404  }
405 
406  void MESetEcal::setBinEntries(DetId const &_id, int _bin, double _entries) {
407  if (!active_)
408  return;
410  return;
411 
412  unsigned iME(binning::findPlotIndex(otype_, _id));
413  checkME_(iME);
414 
415  mes_[iME]->setBinEntries(_bin, _entries);
416  }
417 
418  void MESetEcal::setBinEntries(EcalElectronicsId const &_id, int _bin, double _entries) {
419  if (!active_)
420  return;
422  return;
423 
424  unsigned iME(binning::findPlotIndex(otype_, _id));
425  checkME_(iME);
426 
427  mes_[iME]->setBinEntries(_bin, _entries);
428  }
429 
430  void MESetEcal::setBinEntries(int _dcctccid, int _bin, double _entries) {
431  if (!active_)
432  return;
434  return;
435 
436  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
437  checkME_(iME);
438 
439  mes_[iME]->setBinEntries(_bin, _entries);
440  }
441 
442  double MESetEcal::getBinContent(DetId const &_id, int _bin) const {
443  if (!active_)
444  return 0.;
445 
446  unsigned iME(binning::findPlotIndex(otype_, _id));
447  checkME_(iME);
448 
449  return mes_[iME]->getBinContent(_bin);
450  }
451 
452  double MESetEcal::getBinContent(EcalElectronicsId const &_id, int _bin) const {
453  if (!active_)
454  return 0.;
455 
456  unsigned iME(binning::findPlotIndex(otype_, _id));
457  checkME_(iME);
458 
459  return mes_[iME]->getBinContent(_bin);
460  }
461 
462  double MESetEcal::getBinContent(int _dcctccid, int _bin) const {
463  if (!active_)
464  return 0.;
465 
466  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
467  checkME_(iME);
468 
469  return mes_[iME]->getBinContent(_bin);
470  }
471 
472  double MESetEcal::getBinError(DetId const &_id, int _bin) const {
473  if (!active_)
474  return 0.;
475 
476  unsigned iME(binning::findPlotIndex(otype_, _id));
477  checkME_(iME);
478 
479  return mes_[iME]->getBinError(_bin);
480  }
481 
482  double MESetEcal::getBinError(EcalElectronicsId const &_id, int _bin) const {
483  if (!active_)
484  return 0.;
485 
486  unsigned iME(binning::findPlotIndex(otype_, _id));
487  checkME_(iME);
488 
489  return mes_[iME]->getBinError(_bin);
490  }
491 
492  double MESetEcal::getBinError(int _dcctccid, int _bin) const {
493  if (!active_)
494  return 0.;
495 
496  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
497  checkME_(iME);
498 
499  return mes_[iME]->getBinError(_bin);
500  }
501 
502  double MESetEcal::getBinEntries(DetId const &_id, int _bin) const {
503  if (!active_)
504  return 0.;
506  return 0.;
507 
508  unsigned iME(binning::findPlotIndex(otype_, _id));
509  checkME_(iME);
510 
511  return mes_[iME]->getBinEntries(_bin);
512  }
513 
514  double MESetEcal::getBinEntries(EcalElectronicsId const &_id, int _bin) const {
515  if (!active_)
516  return 0.;
518  return 0.;
519 
520  unsigned iME(binning::findPlotIndex(otype_, _id));
521  checkME_(iME);
522 
523  return mes_[iME]->getBinEntries(_bin);
524  }
525 
526  double MESetEcal::getBinEntries(int _dcctccid, int _bin) const {
527  if (!active_)
528  return 0.;
530  return 0.;
531 
532  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
533  checkME_(iME);
534 
535  return mes_[iME]->getBinEntries(_bin);
536  }
537 
538  int MESetEcal::findBin(DetId const &_id, double _x, double _y /* = 0.*/) const {
539  if (!active_)
540  return -1;
541 
542  unsigned iME(binning::findPlotIndex(otype_, _id));
543  checkME_(iME);
544 
545  return mes_[iME]->getTH1()->FindBin(_x, _y);
546  }
547 
548  int MESetEcal::findBin(EcalElectronicsId const &_id, double _x, double _y /* = 0.*/) const {
549  if (!active_)
550  return -1;
551 
552  unsigned iME(binning::findPlotIndex(otype_, _id));
553  checkME_(iME);
554 
555  return mes_[iME]->getTH1()->FindBin(_x, _y);
556  }
557 
558  int MESetEcal::findBin(int _dcctccid, double _x, double _y /* = 0.*/) const {
559  if (!active_)
560  return -1;
561 
562  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
563  checkME_(iME);
564 
565  return mes_[iME]->getTH1()->FindBin(_x, _y);
566  }
567 
569  return (xaxis_ && xaxis_->edges) || (yaxis_ && yaxis_->edges) || (zaxis_ && zaxis_->edges);
570  }
571 
572  std::vector<std::string> MESetEcal::generatePaths() const {
573  using namespace std;
574 
575  vector<string> paths(0);
576 
577  unsigned nME(binning::getNObjects(otype_));
578 
579  for (unsigned iME(0); iME < nME; iME++) {
581 
582  string path(path_);
583  map<string, string> replacements;
584 
585  switch (obj) {
586  case binning::kEB:
587  case binning::kEBMEM:
588  replacements["subdet"] = "EcalBarrel";
589  replacements["prefix"] = "EB";
590  replacements["suffix"] = "";
591  replacements["subdetshort"] = "EB";
592  replacements["subdetshortsig"] = "EB";
593  replacements["supercrystal"] = "trigger tower";
594  break;
595  case binning::kEE:
596  case binning::kEEMEM:
597  replacements["subdet"] = "EcalEndcap";
598  replacements["prefix"] = "EE";
599  replacements["subdetshort"] = "EE";
600  replacements["subdetshortsig"] = "EE";
601  replacements["supercrystal"] = "super crystal";
602  break;
603  case binning::kEEm:
604  replacements["subdet"] = "EcalEndcap";
605  replacements["prefix"] = "EE";
606  replacements["suffix"] = " EE -";
607  replacements["subdetshort"] = "EE";
608  replacements["subdetshortsig"] = "EEM";
609  replacements["supercrystal"] = "super crystal";
610  break;
611  case binning::kEEp:
612  replacements["subdet"] = "EcalEndcap";
613  replacements["prefix"] = "EE";
614  replacements["suffix"] = " EE +";
615  replacements["subdetshort"] = "EE";
616  replacements["subdetshortsig"] = "EEP";
617  replacements["supercrystal"] = "super crystal";
618  break;
619  case binning::kSM:
620  if (iME <= kEEmHigh || iME >= kEEpLow) {
621  replacements["subdet"] = "EcalEndcap";
622  replacements["prefix"] = "EE";
623  replacements["supercrystal"] = "super crystal";
624  } else {
625  replacements["subdet"] = "EcalBarrel";
626  replacements["prefix"] = "EB";
627  replacements["supercrystal"] = "trigger tower";
628  }
629  replacements["sm"] = binning::channelName(iME + 1);
630  break;
631  case binning::kEBSM:
632  replacements["subdet"] = "EcalBarrel";
633  replacements["prefix"] = "EB";
634  replacements["sm"] = binning::channelName(iME + kEBmLow + 1);
635  replacements["supercrystal"] = "trigger tower";
636  break;
637  case binning::kEESM:
638  replacements["subdet"] = "EcalEndcap";
639  replacements["prefix"] = "EE";
640  replacements["sm"] = binning::channelName(iME <= kEEmHigh ? iME + 1 : iME + 37);
641  replacements["supercrystal"] = "super crystal";
642  break;
643  case binning::kSMMEM: {
644  unsigned iDCC(memDCCId(iME) - 1);
645  // dccId(unsigned) skips DCCs without MEM
646  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
647  replacements["subdet"] = "EcalEndcap";
648  replacements["prefix"] = "EE";
649  } else {
650  replacements["subdet"] = "EcalBarrel";
651  replacements["prefix"] = "EB";
652  }
653  replacements["sm"] = binning::channelName(iDCC + 1);
654  } break;
655  case binning::kEBSMMEM: {
656  unsigned iDCC(memDCCId(iME + 4) - 1);
657  replacements["subdet"] = "EcalBarrel";
658  replacements["prefix"] = "EB";
659  replacements["sm"] = binning::channelName(iDCC + 1);
660  } break;
661  case binning::kEESMMEM: {
662  unsigned iDCC(memDCCId(iME < 4 ? iME : iME + 36) - 1);
663  replacements["subdet"] = "EcalEndcap";
664  replacements["prefix"] = "EE";
665  replacements["sm"] = binning::channelName(iDCC + 1);
666  }
667  default:
668  break;
669  }
670 
671  paths.push_back(formPath(replacements));
672  }
673 
674  return paths;
675  }
676 } // namespace ecaldqm
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
MonitorElement::Kind kind_
Definition: MESet.h:128
double getBinError(DetId const &, int) const override
Definition: MESetEcal.cc:472
double getBinContent(DetId const &, int) const override
Definition: MESetEcal.cc:442
MESet & operator=(MESet const &) override
Definition: MESetEcal.cc:40
MonitorElement * bookFloat(TString const &name)
Definition: DQMStore.cc:233
virtual void clear() const
Definition: MESet.cc:84
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:113
void fill(DetId const &, double=1., double=1., double=1.) override
Definition: MESetEcal.cc:306
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
MESet * clone(std::string const &="") const override
Definition: MESetEcal.cc:61
unsigned getNObjects(ObjectType)
~MESetEcal() override
Definition: MESetEcal.cc:34
#define nullptr
void setLumiFlag()
this ME is meant to be stored for each luminosity section
ObjectType getObject(ObjectType, unsigned)
AxisSpecs getBinning(ObjectType, BinningType, bool, int, unsigned)
void setBinEntries(DetId const &, int, double) override
Definition: MESetEcal.cc:406
void throw_(std::string const &_message) const
Definition: MESet.h:121
bool isVariableBinning() const override
Definition: MESetEcal.cc:568
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
Definition: DQMStore.cc:333
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s")
Definition: DQMStore.cc:381
bool lumiFlag_
Definition: MESet.h:129
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string channelName(uint32_t, BinningType _btype=kDCC)
virtual void fill_(unsigned, int, double)
Definition: MESet.cc:246
std::string formPath(PathReplacements const &) const
Definition: MESet.cc:150
unsigned memDCCId(unsigned)
double getBinEntries(DetId const &, int) const override
Definition: MESetEcal.cc:502
Definition: DetId.h:17
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
Definition: MESetEcal.cc:10
unsigned findPlotIndex(ObjectType, DetId const &)
virtual int findBin(DetId const &, double, double=0.) const
Definition: MESetEcal.cc:538
binning::AxisSpecs const * zaxis_
Definition: MESetEcal.h:76
bool active_
Definition: MESet.h:133
bool retrieve(DQMStore::IGetter &, std::string *=0) const override
Definition: MESetEcal.cc:276
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: DQMStore.cc:266
void setBinContent(DetId const &, int, double) override
Definition: MESetEcal.cc:346
binning::ObjectType otype_
Definition: MESet.h:126
binning::AxisSpecs const * xaxis_
Definition: MESetEcal.h:74
std::vector< std::string > generatePaths() const
Definition: MESetEcal.cc:572
virtual MESet & operator=(MESet const &)
Definition: MESet.cc:64
void setBinError(DetId const &, int, double) override
Definition: MESetEcal.cc:376
binning::AxisSpecs const * yaxis_
Definition: MESetEcal.h:75
binning::BinningType btype_
Definition: MESet.h:127
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:437
std::string path_
Definition: MESet.h:125
virtual TH1 * getTH1() const
std::vector< MonitorElement * > mes_
Definition: MESet.h:123
void book(DQMStore::IBooker &) override
Definition: MESetEcal.cc:70
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
unsigned logicalDimensions_
Definition: MESetEcal.h:73