9 replCandidates_(_replCandidates)
12 std::map<std::string, unsigned> indices;
16 std::function<bool(typename ReplCandidates::const_iterator&)> setReplacements([&setReplacements, &replacements, &indices,
this](
typename ReplCandidates::const_iterator& _rItr){
17 unsigned&
index(indices[_rItr->first]);
18 replacements[_rItr->first] = _rItr->second[
index];
26 else if(setReplacements(_rItr))
29 if(index != _rItr->second.size())
return false;
40 bool last(setReplacements(rItr));
52 sets_(_orig.sets_.
size(), 0),
53 replCandidates_(_orig.replCandidates_)
55 if(
sets_.size() == 0)
return;
57 for(
unsigned iS(0); iS <
sets_.size(); ++iS){
58 if(!_orig.
sets_[iS])
continue;
66 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
73 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
78 MESetMulti const* pRhs(dynamic_cast<MESetMulti const*>(&_rhs));
82 for(
unsigned iS(0); iS < pRhs->
sets_.size(); ++iS){
97 if(_path !=
"")
path_ = _path;
106 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
115 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
116 if(!
sets_[iS]->
retrieve(_igetter, _failedPath))
return false;
125 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
134 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
141 for(
unsigned iS(0); iS <
sets_.size(); ++iS)
148 if(_iSet >=
sets_.size())
149 throw_(
"MESetMulti index out of range");
160 typename PathReplacements::const_iterator rItr(_replacements.find(cItr->first));
161 if(rItr == _replacements.end())
162 throw_(cItr->first +
" not given in the key for getIndex");
163 unsigned nC(cItr->second.size());
165 for(; iR != nC; ++iR)
166 if(rItr->second == cItr->second[iR])
break;
168 throw_(rItr->second +
" not found in replacement candidates");
bool retrieve(DQMStore::IGetter &, std::string *=0) const override
std::vector< MESet * > sets_
void reset(double=0., double=0., double=0.) override
virtual MESet * clone(std::string const &="") const
std::map< std::string, std::vector< std::string > > ReplCandidates
tuple path
else: Piece not in the list, fine.
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
void book(DQMStore::IBooker &) override
MESetMulti(MESet const &, ReplCandidates const &)
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.