36 if (
path_.empty() ||
path_.find(
'/') == std::string::npos ||
38 throw_(_path +
" cannot be used for ME path name");
48 throw_(
"Unsupported MonitorElement kind");
58 lumiFlag_(_orig.lumiFlag_),
59 batchMode_(_orig.batchMode_),
60 active_(_orig.active_) {}
93 unsigned nME(
mes_.size());
94 for (
unsigned iME(0); iME < nME; iME++)
112 unsigned nME(
mes_.size());
115 for (
unsigned iME(0); iME < nME; iME++)
121 if (
_content != 0. || _err != 0. || _entries != 0.)
124 for (
unsigned iME(0); iME < nME; iME++) {
125 TH1 *
h(
mes_[iME]->getTH1());
133 for (
int ix(1); ix <=
nbinsX; ix++) {
134 for (
int iy(1); iy <=
nbinsY; iy++) {
135 int bin(
h->GetBin(ix, iy));
137 h->SetBinError(
bin, _err);
139 static_cast<TProfile *
>(
h)->SetBinEntries(
bin, _entries);
142 static_cast<TProfile2D *
>(
h)->SetBinEntries(
bin, _entries);
149 h->SetEntries(_entries);
156 for (
typename MESet::PathReplacements::const_iterator repItr(_replacements.begin()); repItr != _replacements.end();
164 re.Substitute(
path, repItr->second,
"g");
195 if (searchNeighborsInTower) {
197 for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
198 if ((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
206 for (
int ix(1); ix <= 5; ix++) {
207 for (
int iy(1); iy <= 5; iy++) {
208 int iix((scId.
ix() - 1) * 5 + ix);
209 int iiy((scId.
iy() - 1) * 5 + iy);
219 if ((_statusManager->
getStatus(scId.rawId()) & _mask) != 0)
222 if (searchNeighborsInTower) {
223 for (
int ix(1); ix <= 5; ix++) {
224 for (
int iy(1); iy <= 5; iy++) {
225 int iix((scId.ix() - 1) * 5 + ix);
226 int iiy((scId.iy() - 1) * 5 + iy);
240 for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
241 if ((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
260 TH1 *
h(
me->getTH1());
264 double x(
h->GetXaxis()->GetBinCenter(_bin % (
nbinsX + 2)));
269 double y(
h->GetYaxis()->GetBinCenter(_bin / (
nbinsX + 2)));
282 TH1 *
h(
me->getTH1());
286 double x(
h->GetXaxis()->GetBinCenter(_bin % (
nbinsX + 2)));
300 me->Fill(_x, _wy, _w);
305 if (
iME ==
unsigned(-1))
314 throw cms::Exception(
"InvalidOperation") <<
"MESet::ConstBin::Ctor: const_iterator only available for MESet of " 321 <<
"MESet::ConstBin::Ctor: ME " <<
iME <<
" does not exist for MESet " <<
meSet_->
getPath();
324 iBin =
me->getNbinsX() + 3;
333 <<
" to otype " << meSet_->getObjType() <<
" and btype " << meSet_->getBinType() <<
" (" 334 << _rhs.
meSet_->
getPath() <<
" to " << meSet_->getPath() <<
")";
349 if (iME ==
unsigned(-1))
364 unsigned &iME(bin_.iME);
365 MESet const *meSet(bin_.getMESet());
367 if (iME ==
unsigned(-1))
381 me = meSet->getME(iME);
392 me = meSet->getME(iME);
414 if (!bin_.getMESet())
418 while (bin_.iME !=
unsigned(-1) && !bin_.isChannel(electronicsMap));
424 MESet const *meSet(bin_.getMESet());
425 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
434 if (bin_.iBin / (
me->getNbinsX() + 2) >=
me->getNbinsY())
437 bin_.iBin +=
me->getNbinsX() + 2;
443 MESet const *meSet(bin_.getMESet());
444 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
453 if (bin_.iBin / (
me->getNbinsX() + 2) <= 1)
456 bin_.iBin -=
me->getNbinsX() + 2;
462 MESet const *meSet(bin_.getMESet());
463 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
472 if (bin_.iBin % (
me->getNbinsX() + 2) <= 1)
481 MESet const *meSet(bin_.getMESet());
482 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
491 if (bin_.iBin % (
me->getNbinsX() + 2) >=
me->getNbinsX())
virtual std::string const & getPath() const
MonitorElement::Kind kind_
MonitorElement::Kind getKind() const
virtual void setAxisTitle(std::string const &, int=1)
const_iterator & operator++()
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
binning::ObjectType otype
constexpr Process operator++(Process p)
void throw_(std::string const &_message) const
ObjectType getObject(ObjectType, unsigned)
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *, EcalTrigTowerConstituentsMap const *) const
virtual MonitorElement const * getME(unsigned _iME) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual MESet * clone(std::string const &="") const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int findBin2D(EcalElectronicsMapping const *, ObjectType, BinningType, DetId const &)
ConstBin & operator=(ConstBin const &)
virtual void fill_(unsigned, int, double)
bool isEcalScDetId(DetId const &)
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
constexpr uint32_t rawId() const
get the raw id
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
virtual void resetAll(double=0., double=0., double=0.)
const_iterator & toNextChannel(EcalElectronicsMapping const *)
void setMESet(MESet const &_meSet)
binning::ObjectType otype_
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
uint32_t getStatus(uint32_t) const
binning::ObjectType getObjType() const
virtual MESet & operator=(MESet const &)
binning::BinningType btype_
virtual void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual void clear() const
binning::BinningType getBinType() const
std::vector< MonitorElement * > mes_
std::string formPath(PathReplacements const &) const