12 MESet(_fullPath, _otype, _btype, _kind),
13 logicalDimensions_(_logicalDimensions),
14 xaxis_(_xaxis ? new
binning::AxisSpecs(*_xaxis) : 0),
15 yaxis_(_yaxis ? new
binning::AxisSpecs(*_yaxis) : 0),
16 zaxis_(_zaxis ? new
binning::AxisSpecs(*_zaxis) : 0)
19 throw_(
"Need axis specifications");
24 logicalDimensions_(_orig.logicalDimensions_),
25 xaxis_(_orig.xaxis_ ? new
binning::AxisSpecs(*_orig.xaxis_) : 0),
26 yaxis_(_orig.yaxis_ ? new
binning::AxisSpecs(*_orig.yaxis_) : 0),
27 zaxis_(_orig.zaxis_ ? new
binning::AxisSpecs(*_orig.zaxis_) : 0)
48 MESetEcal const* pRhs(dynamic_cast<MESetEcal const*>(&_rhs));
62 if(_path !=
"")
path_ = _path;
86 if(mePaths.size() == 0){
87 if(_failedPath) _failedPath->clear();
91 for(
unsigned iME(0); iME < mePaths.size(); iME++){
93 if(path.find(
'%') != std::string::npos)
94 throw_(
"retrieve() called with incompletely formed path [" + path +
"]");
97 if(me)
mes_.push_back(me);
100 if(_failedPath) *_failedPath =
path;
117 fill_(iME, _x, _wy, _w);
128 fill_(iME, _x, _wy, _w);
139 fill_(iME, _x, _wy, _w);
147 if(
mes_.size() != 1)
return;
149 fill_(0, _x, _wy, _w);
160 mes_[iME]->setBinContent(_bin, _content);
171 mes_[iME]->setBinContent(_bin, _content);
182 mes_[iME]->setBinContent(_bin, _content);
193 mes_[iME]->setBinError(_bin, _error);
204 mes_[iME]->setBinError(_bin, _error);
215 mes_[iME]->setBinError(_bin, _error);
227 mes_[iME]->setBinEntries(_bin, _entries);
239 mes_[iME]->setBinEntries(_bin, _entries);
251 mes_[iME]->setBinEntries(_bin, _entries);
262 return mes_[iME]->getBinContent(_bin);
273 return mes_[iME]->getBinContent(_bin);
284 return mes_[iME]->getBinContent(_bin);
295 return mes_[iME]->getBinError(_bin);
306 return mes_[iME]->getBinError(_bin);
317 return mes_[iME]->getBinError(_bin);
329 return mes_[iME]->getBinEntries(_bin);
341 return mes_[iME]->getBinEntries(_bin);
353 return mes_[iME]->getBinEntries(_bin);
364 return mes_[iME]->getTH1()->FindBin(_x, _y);
375 return mes_[iME]->getTH1()->FindBin(_x, _y);
386 return mes_[iME]->getTH1()->FindBin(_x, _y);
395 std::vector<std::string>
400 vector<string>
paths(0);
404 for(
unsigned iME(0); iME < nME; iME++) {
408 map<string, string> replacements;
413 replacements[
"subdet"] =
"EcalBarrel";
414 replacements[
"prefix"] =
"EB";
415 replacements[
"suffix"] =
"";
416 replacements[
"subdetshort"] =
"EB";
417 replacements[
"subdetshortsig"] =
"EB";
418 replacements[
"supercrystal"] =
"trigger tower";
422 replacements[
"subdet"] =
"EcalEndcap";
423 replacements[
"prefix"] =
"EE";
424 replacements[
"subdetshort"] =
"EE";
425 replacements[
"subdetshortsig"] =
"EE";
426 replacements[
"supercrystal"] =
"super crystal";
429 replacements[
"subdet"] =
"EcalEndcap";
430 replacements[
"prefix"] =
"EE";
431 replacements[
"suffix"] =
" EE -";
432 replacements[
"subdetshort"] =
"EE";
433 replacements[
"subdetshortsig"] =
"EEM";
434 replacements[
"supercrystal"] =
"super crystal";
437 replacements[
"subdet"] =
"EcalEndcap";
438 replacements[
"prefix"] =
"EE";
439 replacements[
"suffix"] =
" EE +";
440 replacements[
"subdetshort"] =
"EE";
441 replacements[
"subdetshortsig"] =
"EEP";
442 replacements[
"supercrystal"] =
"super crystal";
445 if(iME <= kEEmHigh || iME >=
kEEpLow){
446 replacements[
"subdet"] =
"EcalEndcap";
447 replacements[
"prefix"] =
"EE";
448 replacements[
"supercrystal"] =
"super crystal";
451 replacements[
"subdet"] =
"EcalBarrel";
452 replacements[
"prefix"] =
"EB";
453 replacements[
"supercrystal"] =
"trigger tower";
458 replacements[
"subdet"] =
"EcalBarrel";
459 replacements[
"prefix"] =
"EB";
461 replacements[
"supercrystal"] =
"trigger tower";
464 replacements[
"subdet"] =
"EcalEndcap";
465 replacements[
"prefix"] =
"EE";
467 replacements[
"supercrystal"] =
"super crystal";
473 if(iDCC <= kEEmHigh || iDCC >=
kEEpLow){
474 replacements[
"subdet"] =
"EcalEndcap";
475 replacements[
"prefix"] =
"EE";
478 replacements[
"subdet"] =
"EcalBarrel";
479 replacements[
"prefix"] =
"EB";
486 unsigned iDCC(
memDCCId(iME + 4) - 1);
487 replacements[
"subdet"] =
"EcalBarrel";
488 replacements[
"prefix"] =
"EB";
494 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
495 replacements[
"subdet"] =
"EcalEndcap";
496 replacements[
"prefix"] =
"EE";
503 paths.push_back(
formPath(replacements));
509 template<
class Bookable>
519 for(
unsigned iME(0); iME < mePaths.size(); iME++){
520 string&
path(mePaths[iME]);
521 if(path.find(
'%') != string::npos)
522 throw_(
"book() called with incompletely formed path [" + path +
"]");
537 if(xaxis.
nbins == 0){
551 if(isMap && yaxis.
nbins == 0){
565 if(yaxis.
high - yaxis.
low < 1.e-10){
570 if(zaxis.
high - zaxis.
low < 1.e-10){
576 size_t slashPos(path.find_last_of(
'/'));
577 string name(path.substr(slashPos + 1));
579 _booker.setCurrentFolder(path.substr(0, slashPos));
585 me = _booker.bookFloat(
name);
592 for(
int i(0);
i < xaxis.
nbins + 1;
i++)
614 float*
edges[] = {
new float[xaxis.
nbins + 1],
new float[yaxis.
nbins + 1]};
615 for(
int iSpec(0); iSpec < 2; iSpec++){
616 if(specs[iSpec]->edges){
617 for(
int i(0);
i < specs[iSpec]->
nbins + 1;
i++)
618 edges[iSpec][
i] = specs[iSpec]->edges[
i];
622 double low(specs[iSpec]->low), high(specs[iSpec]->high);
623 for(
int i(0);
i < nbins + 1;
i++)
624 edges[iSpec][
i] = low + (high - low) / nbins *
i;
628 for(
int iSpec(0); iSpec < 2; iSpec++)
629 delete [] edges[iSpec];
642 throw_(
"Variable bin size for 2D profile not implemented");
643 me = _booker.bookProfile2D(
name,
name, xaxis.
nbins, xaxis.
low, xaxis.
high, yaxis.
nbins, yaxis.
low, yaxis.
high, zaxis.
low, zaxis.
high,
"");
652 throw_(
"ME could not be booked");
660 for(
int iBin(1); iBin <= xaxis.
nbins; ++iBin)
664 for(
int iBin(1); iBin <= yaxis.
nbins; ++iBin)
668 for(
int iBin(1); iBin <= zaxis.
nbins; ++iBin)
675 me->
getTH1()->SetBit(uint32_t(actualObject + 1) << 20);
676 if(isMap) me->
getTH1()->SetBit(0x1 << 19);
MonitorElement::Kind kind_
double getBinError(DetId const &, int) const override
MESet & operator=(MESet const &) override
virtual void clear() const
virtual void checkME_(unsigned _iME) const
void fill(DetId const &, double=1., double=1., double=1.) override
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
unsigned getNObjects(ObjectType)
void book(DQMStore &) override
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)
double getBinEntries(DetId const &, int) const override
bool retrieve(DQMStore const &, std::string *=0) const override
ObjectType getObject(ObjectType, unsigned)
MESet * clone(std::string const &="") const override
AxisSpecs getBinning(ObjectType, BinningType, bool, int, unsigned)
std::vector< MonitorElement * > mes_
bool isVariableBinning() const override
void setBinEntries(DetId const &, int, double) override
double getBinContent(DetId const &, int) const override
const T & max(const T &a, const T &b)
void throw_(std::string const &_message) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::string channelName(uint32_t, BinningType _btype=kDCC)
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) const
unsigned memDCCId(unsigned)
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
unsigned findPlotIndex(ObjectType, DetId const &)
virtual int findBin(DetId const &, double, double=0.) const
binning::AxisSpecs const * zaxis_
void setBinContent(DetId const &, int, double) override
binning::ObjectType otype_
binning::AxisSpecs const * xaxis_
std::vector< std::string > generatePaths() const
virtual MESet & operator=(MESet const &)
void setBinError(DetId const &, int, double) override
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
binning::AxisSpecs const * yaxis_
binning::BinningType btype_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
unsigned logicalDimensions_