|
|
Go to the documentation of this file.
14 unsigned _logicalDimensions,
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) {
24 throw_(
"Need axis specifications");
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) {}
48 MESetEcal const *pRhs(dynamic_cast<MESetEcal const *>(&_rhs));
73 auto oldscope = MonitorElementData::Scope::RUN;
75 oldscope = _ibooker.
setScope(MonitorElementData::Scope::LUMI);
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 +
"]");
101 if (
xaxis.nbins == 0) {
107 delete[]
xaxis.labels;
114 if (isMap &&
yaxis.nbins == 0) {
120 delete[]
yaxis.labels;
138 size_t slashPos(
path.find_last_of(
'/'));
139 string name(
path.substr(slashPos + 1));
174 for (
int iSpec(0); iSpec < 2; iSpec++) {
176 specs[iSpec]->edges =
new float[
specs[iSpec]->nbins + 1];
195 throw_(
"Variable bin size for 2D profile not implemented");
215 throw_(
"ME could not be booked");
218 me->setAxisTitle(
xaxis.title, 1);
219 me->setAxisTitle(
yaxis.title, 2);
221 me->setAxisTitle(
zaxis.title, 3);
224 for (
int iBin(1); iBin <=
xaxis.nbins; ++iBin)
225 me->setBinLabel(iBin,
xaxis.labels[iBin - 1], 1);
228 for (
int iBin(1); iBin <=
yaxis.nbins; ++iBin)
229 me->setBinLabel(iBin,
yaxis.labels[iBin - 1], 2);
232 for (
int iBin(1); iBin <=
zaxis.nbins; ++iBin)
233 me->setBinLabel(iBin,
zaxis.labels[iBin - 1], 3);
268 me->getTH1()->SetUniqueID(uint32_t(2 * (actualObject + 1) + (isMap ? 1 : 0)));
284 if (mePaths.empty()) {
286 _failedPath->clear();
290 for (
unsigned iME(0); iME < mePaths.size(); iME++) {
292 if (
path.find(
'%') != std::string::npos)
293 throw_(
"retrieve() called with incompletely formed path [" +
path +
"]");
317 fill_(iME, _x, _wy, _w);
327 fill_(iME, _x, _wy, _w);
337 fill_(iME, _x, _wy, _w);
344 if (
mes_.size() != 1)
347 fill_(0, _x, _wy, _w);
387 mes_[iME]->setBinError(_bin, _error);
397 mes_[iME]->setBinError(_bin, _error);
407 mes_[iME]->setBinError(_bin, _error);
419 mes_[iME]->setBinEntries(_bin, _entries);
431 mes_[iME]->setBinEntries(_bin, _entries);
443 mes_[iME]->setBinEntries(_bin, _entries);
453 return mes_[iME]->getBinContent(_bin);
463 return mes_[iME]->getBinContent(_bin);
473 return mes_[iME]->getBinContent(_bin);
483 return mes_[iME]->getBinError(_bin);
493 return mes_[iME]->getBinError(_bin);
503 return mes_[iME]->getBinError(_bin);
515 return mes_[iME]->getBinEntries(_bin);
527 return mes_[iME]->getBinEntries(_bin);
539 return mes_[iME]->getBinEntries(_bin);
549 return mes_[iME]->getTH1()->FindBin(_x, _y);
559 return mes_[iME]->getTH1()->FindBin(_x, _y);
569 return mes_[iME]->getTH1()->FindBin(_x, _y);
579 vector<string>
paths(0);
583 for (
unsigned iME(0); iME < nME; iME++) {
587 map<string, string> replacements;
592 replacements[
"subdet"] =
"EcalBarrel";
593 replacements[
"prefix"] =
"EB";
594 replacements[
"suffix"] =
"";
595 replacements[
"subdetshort"] =
"EB";
596 replacements[
"subdetshortsig"] =
"EB";
597 replacements[
"supercrystal"] =
"trigger tower";
601 replacements[
"subdet"] =
"EcalEndcap";
602 replacements[
"prefix"] =
"EE";
603 replacements[
"subdetshort"] =
"EE";
604 replacements[
"subdetshortsig"] =
"EE";
605 replacements[
"supercrystal"] =
"super crystal";
608 replacements[
"subdet"] =
"EcalEndcap";
609 replacements[
"prefix"] =
"EE";
610 replacements[
"suffix"] =
" EE -";
611 replacements[
"subdetshort"] =
"EE";
612 replacements[
"subdetshortsig"] =
"EEM";
613 replacements[
"supercrystal"] =
"super crystal";
616 replacements[
"subdet"] =
"EcalEndcap";
617 replacements[
"prefix"] =
"EE";
618 replacements[
"suffix"] =
" EE +";
619 replacements[
"subdetshort"] =
"EE";
620 replacements[
"subdetshortsig"] =
"EEP";
621 replacements[
"supercrystal"] =
"super crystal";
624 if (iME <= kEEmHigh || iME >=
kEEpLow) {
625 replacements[
"subdet"] =
"EcalEndcap";
626 replacements[
"prefix"] =
"EE";
627 replacements[
"supercrystal"] =
"super crystal";
629 replacements[
"subdet"] =
"EcalBarrel";
630 replacements[
"prefix"] =
"EB";
631 replacements[
"supercrystal"] =
"trigger tower";
636 replacements[
"subdet"] =
"EcalBarrel";
637 replacements[
"prefix"] =
"EB";
639 replacements[
"supercrystal"] =
"trigger tower";
642 replacements[
"subdet"] =
"EcalEndcap";
643 replacements[
"prefix"] =
"EE";
645 replacements[
"supercrystal"] =
"super crystal";
650 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow) {
651 replacements[
"subdet"] =
"EcalEndcap";
652 replacements[
"prefix"] =
"EE";
654 replacements[
"subdet"] =
"EcalBarrel";
655 replacements[
"prefix"] =
"EB";
660 unsigned iDCC(
memDCCId(iME + 4) - 1);
661 replacements[
"subdet"] =
"EcalBarrel";
662 replacements[
"prefix"] =
"EB";
666 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
667 replacements[
"subdet"] =
"EcalEndcap";
668 replacements[
"prefix"] =
"EE";
void throw_(std::string const &_message) const
virtual void fill_(unsigned, int, double)
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
double getBinEntries(DetId const &, int) const override
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
void setBinContent(DetId const &, int, double) override
unsigned logicalDimensions_
virtual MESet & operator=(MESet const &)
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())
double getBinError(DetId const &, int) const override
virtual void setCurrentFolder(std::string const &fullpath)
bool isVariableBinning() const override
void fill(DetId const &, double=1., double=1., double=1.) override
unsigned getNObjects(ObjectType)
MESet & operator=(MESet const &) override
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())
double getBinContent(DetId const &, int) const override
ObjectType getObject(ObjectType, unsigned)
binning::ObjectType otype_
unsigned memDCCId(unsigned)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
AxisSpecs getBinning(ObjectType, BinningType, bool, int, unsigned)
virtual int findBin(DetId const &, double, double=0.) const
void book(DQMStore::IBooker &) override
binning::BinningType btype_
bool retrieve(DQMStore::IGetter &, std::string *=nullptr) const override
const binning::AxisSpecs * xaxis_
unsigned findPlotIndex(ObjectType, DetId const &)
std::vector< MonitorElement * > mes_
std::vector< std::string > generatePaths() const
virtual void clear() const
std::string channelName(uint32_t, BinningType _btype=kDCC)
virtual void checkME_(unsigned _iME) const
const binning::AxisSpecs * zaxis_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::string formPath(PathReplacements const &) const
MESet * clone(std::string const &="") const override
virtual MonitorElement * get(std::string const &fullpath) const
const binning::AxisSpecs * yaxis_
void setBinEntries(DetId const &, int, double) override
MonitorElement::Kind kind_
void setBinError(DetId const &, int, double) override
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())