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