5 :
MESet(_seed), current_(nullptr), sets_(), replCandidates_(_replCandidates) {
7 std::map<std::string, unsigned>
indices;
11 std::function<bool(typename ReplCandidates::const_iterator &)> setReplacements(
12 [&setReplacements, &replacements, &
indices,
this](
typename ReplCandidates::const_iterator &_rItr) {
14 replacements[_rItr->first] = _rItr->second[
index];
22 }
else if (setReplacements(_rItr))
25 if (
index != _rItr->second.size())
36 bool last(setReplacements(rItr));
46 :
MESet(_orig), current_(nullptr), sets_(_orig.sets_.
size(), nullptr), replCandidates_(_orig.replCandidates_) {
50 for (
unsigned iS(0); iS <
sets_.size(); ++iS) {
60 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
65 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
70 MESetMulti const *pRhs(dynamic_cast<MESetMulti const *>(&_rhs));
74 for (
unsigned iS(0); iS < pRhs->
sets_.size(); ++iS) {
96 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
97 sets_[iS]->
book(_ibooker, electronicsMap);
105 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
106 if (!
sets_[iS]->
retrieve(electronicsMap, _igetter, _failedPath))
114 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
124 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
129 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
134 if (_iSet >=
sets_.size())
135 throw_(
"MESetMulti index out of range");
145 typename PathReplacements::const_iterator rItr(_replacements.find(cItr->first));
146 if (rItr == _replacements.end())
147 throw_(cItr->first +
" not given in the key for getIndex");
148 unsigned nC(cItr->second.size());
150 for (; iR != nC; ++iR)
151 if (rItr->second == cItr->second[iR])
154 throw_(rItr->second +
" not found in replacement candidates");
bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string *=nullptr) const override
void throw_(std::string const &_message) const
std::map< std::string, std::vector< std::string > > ReplCandidates
MESet * clone(std::string const &="") const override
void resetAll(double=0., double=0., double=0.) override
virtual MESet * clone(std::string const &="") const
std::vector< MESet * > sets_
unsigned getIndex(PathReplacements const &) const
MESetMulti(MESet const &, ReplCandidates const &)
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
virtual MESet & operator=(MESet const &)
ReplCandidates replCandidates_
MESet & operator=(MESet const &) override
std::map< std::string, std::string > PathReplacements
void clear() const override
std::string formPath(PathReplacements const &) const