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) {
13 unsigned &
index(indices[_rItr->first]);
14 replacements[_rItr->first] = _rItr->second[
index];
22 }
else if (setReplacements(_rItr))
25 if (index != _rItr->second.size())
37 bool last(setReplacements(rItr));
48 :
MESet(_orig), current_(nullptr), sets_(_orig.sets_.
size(), nullptr), replCandidates_(_orig.replCandidates_) {
52 for (
unsigned iS(0); iS <
sets_.size(); ++iS) {
62 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
67 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
72 MESetMulti const *pRhs(dynamic_cast<MESetMulti const *>(&_rhs));
76 for (
unsigned iS(0); iS < pRhs->
sets_.size(); ++iS) {
98 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
99 sets_[iS]->
book(_ibooker, electronicsMap);
107 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
108 if (!
sets_[iS]->
retrieve(electronicsMap, _igetter, _failedPath))
116 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
126 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
127 sets_[iS]->
reset(electronicsMap, _content, _error, _entries);
131 for (
unsigned iS(0); iS <
sets_.size(); ++iS)
136 if (_iSet >=
sets_.size())
137 throw_(
"MESetMulti index out of range");
147 typename PathReplacements::const_iterator rItr(_replacements.find(cItr->first));
148 if (rItr == _replacements.end())
149 throw_(cItr->first +
" not given in the key for getIndex");
150 unsigned nC(cItr->second.size());
152 for (; iR != nC; ++iR)
153 if (rItr->second == cItr->second[iR])
156 throw_(rItr->second +
" not found in replacement candidates");
bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string *=nullptr) const override
virtual MESet * clone(std::string const &="") const
std::map< std::string, std::vector< std::string > > ReplCandidates
void throw_(std::string const &_message) const
MESet * clone(std::string const &="") const override
void resetAll(double=0., double=0., double=0.) override
std::string formPath(PathReplacements const &) const
std::vector< MESet * > sets_
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
unsigned getIndex(PathReplacements const &) const
tuple size
Write out results.