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.empty() || !xaxis.title.empty()) { // PSet specifies title / label only
104  std::vector<string> labels(xaxis.labels);
105  std::string title(xaxis.title);
106  xaxis = xdef;
107  xaxis.labels = labels;
108  xaxis.title = title;
109  } else
110  xaxis = xdef;
111  }
112 
113  if (isMap && yaxis.nbins == 0) {
114  binning::AxisSpecs ydef(binning::getBinning(electronicsMap, actualObject, btype_, isMap, 2, iME));
115  if (!yaxis.labels.empty() || !yaxis.title.empty()) { // PSet specifies title / label only
116  std::vector<string> labels(yaxis.labels);
117  std::string title(yaxis.title);
118  yaxis = ydef;
119  yaxis.labels = labels;
120  yaxis.title = title;
121  } else
122  yaxis = ydef;
123  }
124 
125  if (yaxis.high - yaxis.low < 1.e-10) {
128  }
129 
130  if (zaxis.high - zaxis.low < 1.e-10) {
133  }
134  }
135 
136  size_t slashPos(path.find_last_of('/'));
137  string name(path.substr(slashPos + 1));
138  _ibooker.cd();
139  _ibooker.setCurrentFolder(path.substr(0, slashPos));
140 
141  MonitorElement *me(nullptr);
142 
143  switch (kind_) {
145  me = _ibooker.bookFloat(name);
146 
147  break;
148 
150  if (xaxis.edges.empty())
151  me = _ibooker.book1D(name, name, xaxis.nbins, xaxis.low, xaxis.high);
152  else
153  me = _ibooker.book1D(name, name, xaxis.nbins, &(xaxis.edges[0]));
154 
155  break;
156 
158  if (xaxis.edges.empty()) {
159  me = _ibooker.bookProfile(name, name, xaxis.nbins, xaxis.low, xaxis.high, yaxis.low, yaxis.high, "");
160  } else {
161  // DQMStore bookProfile interface uses double* for bin edges
162  double *edges(new double[xaxis.nbins + 1]);
163  std::copy(xaxis.edges.begin(), xaxis.edges.end(), edges);
164  me = _ibooker.bookProfile(name, name, xaxis.nbins, edges, yaxis.low, yaxis.high, "");
165  delete[] edges;
166  }
167 
168  break;
169 
171  if (xaxis.edges.empty() && yaxis.edges.empty()) {
172  me = _ibooker.book2D(name, name, xaxis.nbins, xaxis.low, xaxis.high, yaxis.nbins, yaxis.low, yaxis.high);
173  } else {
175  for (int iSpec(0); iSpec < 2; iSpec++) {
176  if (!specs[iSpec]->edges.empty()) {
177  specs[iSpec]->edges = std::vector<float>(specs[iSpec]->nbins + 1);
178  int nbins(specs[iSpec]->nbins);
179  double low(specs[iSpec]->low), high(specs[iSpec]->high);
180  for (int i(0); i < nbins + 1; i++)
181  specs[iSpec]->edges[i] = low + (high - low) / nbins * i;
182  }
183  }
184  me = _ibooker.book2D(name, name, xaxis.nbins, &(xaxis.edges[0]), yaxis.nbins, &(yaxis.edges[0]));
185  }
186 
187  break;
188 
190  if (!zaxis.edges.empty()) {
191  zaxis.low = zaxis.edges[0];
192  zaxis.high = zaxis.edges[zaxis.nbins];
193  }
194  if (!(xaxis.edges.empty() && yaxis.edges.empty()))
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.empty()) {
224  for (int iBin(1); iBin <= xaxis.nbins; ++iBin)
225  me->setBinLabel(iBin, xaxis.labels[iBin - 1], 1);
226  }
227  if (!yaxis.labels.empty()) {
228  for (int iBin(1); iBin <= yaxis.nbins; ++iBin)
229  me->setBinLabel(iBin, yaxis.labels[iBin - 1], 2);
230  }
231  if (!zaxis.labels.empty()) {
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.empty()) || (yaxis_ && !yaxis_->edges.empty()) ||
594  (zaxis_ && !zaxis_->edges.empty());
595  }
596 
597  std::vector<std::string> MESetEcal::generatePaths(EcalElectronicsMapping const *electronicsMap) const {
598  using namespace std;
599 
600  vector<string> paths(0);
601 
602  unsigned nME(binning::getNObjects(otype_));
603 
604  for (unsigned iME(0); iME < nME; iME++) {
606 
607  string path(path_);
608  map<string, string> replacements;
609 
610  switch (obj) {
611  case binning::kEB:
612  case binning::kEBMEM:
613  replacements["subdet"] = "EcalBarrel";
614  replacements["prefix"] = "EB";
615  replacements["suffix"] = "";
616  replacements["subdetshort"] = "EB";
617  replacements["subdetshortsig"] = "EB";
618  replacements["supercrystal"] = "trigger tower";
619  break;
620  case binning::kEE:
621  case binning::kEEMEM:
622  replacements["subdet"] = "EcalEndcap";
623  replacements["prefix"] = "EE";
624  replacements["subdetshort"] = "EE";
625  replacements["subdetshortsig"] = "EE";
626  replacements["supercrystal"] = "super crystal";
627  break;
628  case binning::kEEm:
629  replacements["subdet"] = "EcalEndcap";
630  replacements["prefix"] = "EE";
631  replacements["suffix"] = " EE -";
632  replacements["subdetshort"] = "EE";
633  replacements["subdetshortsig"] = "EEM";
634  replacements["supercrystal"] = "super crystal";
635  break;
636  case binning::kEEp:
637  replacements["subdet"] = "EcalEndcap";
638  replacements["prefix"] = "EE";
639  replacements["suffix"] = " EE +";
640  replacements["subdetshort"] = "EE";
641  replacements["subdetshortsig"] = "EEP";
642  replacements["supercrystal"] = "super crystal";
643  break;
644  case binning::kSM:
645  if (iME <= kEEmHigh || iME >= kEEpLow) {
646  replacements["subdet"] = "EcalEndcap";
647  replacements["prefix"] = "EE";
648  replacements["supercrystal"] = "super crystal";
649  } else {
650  replacements["subdet"] = "EcalBarrel";
651  replacements["prefix"] = "EB";
652  replacements["supercrystal"] = "trigger tower";
653  }
654  replacements["sm"] = binning::channelName(electronicsMap, iME + 1);
655  break;
656  case binning::kEBSM:
657  replacements["subdet"] = "EcalBarrel";
658  replacements["prefix"] = "EB";
659  replacements["sm"] = binning::channelName(electronicsMap, iME + kEBmLow + 1);
660  replacements["supercrystal"] = "trigger tower";
661  break;
662  case binning::kEESM:
663  replacements["subdet"] = "EcalEndcap";
664  replacements["prefix"] = "EE";
665  replacements["sm"] = binning::channelName(electronicsMap, iME <= kEEmHigh ? iME + 1 : iME + 37);
666  replacements["supercrystal"] = "super crystal";
667  break;
668  case binning::kSMMEM: {
669  unsigned iDCC(memDCCId(iME) - 1);
670  // dccId(unsigned) skips DCCs without MEM
671  if (iDCC <= kEEmHigh || iDCC >= kEEpLow) {
672  replacements["subdet"] = "EcalEndcap";
673  replacements["prefix"] = "EE";
674  } else {
675  replacements["subdet"] = "EcalBarrel";
676  replacements["prefix"] = "EB";
677  }
678  replacements["sm"] = binning::channelName(electronicsMap, iDCC + 1);
679  } break;
680  case binning::kEBSMMEM: {
681  unsigned iDCC(memDCCId(iME + 4) - 1);
682  replacements["subdet"] = "EcalBarrel";
683  replacements["prefix"] = "EB";
684  replacements["sm"] = binning::channelName(electronicsMap, iDCC + 1);
685  } break;
686  case binning::kEESMMEM: {
687  unsigned iDCC(memDCCId(iME < 4 ? iME : iME + 36) - 1);
688  replacements["subdet"] = "EcalEndcap";
689  replacements["prefix"] = "EE";
690  replacements["sm"] = binning::channelName(electronicsMap, iDCC + 1);
691  }
692  default:
693  break;
694  }
695 
696  paths.push_back(formPath(replacements));
697  }
698 
699  return paths;
700  }
701 } // 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
std::vector< float > edges
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:597
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:712
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