20 std::vector<std::string>
names =
23 for(std::vector<std::string>::const_iterator it = names.begin();
24 it != names.end(); ++it)
34 std::vector<std::string>::const_iterator
begin,
35 std::vector<std::string>::const_iterator
end,
36 bool special, std::ostream *
dump)
37 : collector_(collector), dump_(dump), special_(special)
47 if (++iter_.back().first == iter_.back().second)
63 bool special = special_ && iter_.size() == 1;
64 if ( (!line.empty() && line[0] ==
'+') || special) {
65 if (++iter_.back().first == iter_.back().second) {
74 pos = collector_->contents_.find(block);
75 if (pos == collector_->contents_.end())
77 <<
"ParameterCollector could not find configuration lines "
78 "block \"" << block <<
"\", included via plus sign.";
81 *dump_ <<
"\n####### " << block <<
" #######" << std::endl;
83 if (!pos->second.empty())
84 iter_.push_back(
IterPair(pos->second.begin(),
87 cache_ = collector_->resolve(line);
89 *dump_ << cache_ << std::endl;
101 <<
"ParameterCollector could not find \"parameterSets\" block.";
103 return const_iterator(
this, pos->second.begin(), pos->second.end(),
true);
112 <<
"ParameterCollector could not find \"parameterSets\" block.";
114 return const_iterator(
this, pos->second.begin(), pos->second.end(),
124 <<
"ParameterCollector could not find \"" << block <<
"\" block.";
126 return const_iterator(
this, pos->second.begin(), pos->second.end());
135 <<
"ParameterCollector could not find \"" << block <<
"\" block.";
137 dump <<
"\n####### " << block <<
" #######" << std::endl;
139 return const_iterator(
this, pos->second.begin(), pos->second.end(),
149 if (pos == std::string::npos)
153 if (endpos == std::string::npos)
159 const char *
path = std::getenv(var.c_str());
161 result.replace(pos, endpos - pos, path ? path :
"");
T getParameter(std::string const &) const
static std::string resolve(const std::string &line)
static const HistoName names[]
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
std::pair< std::vector< std::string >::const_iterator, std::vector< std::string >::const_iterator > IterPair
friend class const_iterator
std::map< std::string, std::vector< std::string > > contents_
std::vector< IterPair > iter_
const_iterator begin() const