26 replace.insert(std::make_pair(fromPrefix + from + fromPostfix, toPrefix + to + toPostfix));
32 parameterSet_(psetString),
33 paths_(parameterSet_.getParameter<
StringVector>(
"@paths")),
39 for (StringVector::const_iterator
i =
paths_.begin(),
e =
paths_.end();
i !=
e; ++
i) {
49 : parameterSet_(pset), tPaths_(parameterSet_.getParameter<
StringVector>(
"@trigger_paths")), triggerPaths_() {
61 bool alreadyByReference)
62 : parameterSets_(), mainParameterSets_(), triggerPaths_(), replace_(), parameterSetIdConverter_(idConverter) {
63 for (ParameterSetMap::const_iterator
i = psetMap.begin(), iEnd = psetMap.end();
i != iEnd; ++
i) {
66 if (alreadyByReference) {
76 if (
i->triggerPaths_ ==
j->triggerPaths_) {
77 j->parameterSet_.addParameter(
"@trigger_paths",
i->parameterSet_);
98 if (
i->first.find(
"@all_sources") != std::string::npos) {
104 if (
i->first.find(
"@trigger_paths") != std::string::npos) {
119 bool doItAgain =
false;
123 it =
i->first.find(
j->first)) {
124 i->first.replace(it,
j->first.size(),
j->second);
130 if (
i->first.find(
"+P") == std::string::npos &&
i->first.find(
"+p") == std::string::npos) {
131 if (
i->first.find(
"@all_sources") != std::string::npos) {
140 insertIntoReplace(
replace_, loldparam, from, rparam, lparam, to, rparam);
141 insertIntoReplace(
replace_, comma, from, comma, comma, to, comma);
142 insertIntoReplace(
replace_, comma, from, rvparam, comma, to, rvparam);
143 insertIntoReplace(
replace_, loldvparam, from, comma, lvparam, to, comma);
144 insertIntoReplace(
replace_, loldvparam, from, rvparam, lvparam, to, rvparam);
148 if (
i->first.find(
"@trigger_paths") != std::string::npos) {
152 StringWithIDList::iterator icopy =
i;
161 std::list<std::string>
pieces;
162 split(std::back_inserter(pieces),
k.first,
'<',
';',
'>');
163 for (std::list<std::string>::iterator
i = pieces.begin(),
e = pieces.end();
i !=
e; ++
i) {
165 if (removeName.size() >= 4) {
166 if (removeName[1] ==
'P') {
167 std::string psetString(removeName.begin() + 3, removeName.end() - 1);
168 parameterSets_.push_back(std::make_pair(psetString,
ParameterSetID()));
170 }
else if (removeName[1] ==
'p') {
173 split(std::back_inserter(temp), pvec,
'{',
',',
'}');
174 for (StringList::const_iterator
j = temp.begin(),
f = temp.end();
j !=
f; ++
j) {
void setID(ParameterSetID const &id)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const_iterator end() const
ParameterSetID id() const
TriggerPath(ParameterSet const &pset)
std::vector< std::string > StringVector
StringWithIDList parameterSets_
const_iterator begin() const
ParameterSetIdConverter & parameterSetIdConverter_
ParameterSetConverter(ParameterSetMap const &psetMap, ParameterSetIdConverter &idConverter, bool alreadyByReference)
std::vector< MainParameterSet > mainParameterSets_
std::vector< TriggerPath > triggerPaths_
ParameterSet parameterSet_
vector_type::const_iterator const_iterator
void convertParameterSets()
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
std::map< std::string, std::string > StringMap
bool insertMapped(value_type const &v, bool forceUpdate=false)
bool split(OutIter result, std::string const &string_to_split, char first, char sep, char last)
Hash< ParameterSetType > ParameterSetID
T getParameter(std::string const &) const
bool search_all(ForwardSequence const &s, Datum const &d)
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
void noConvertParameterSets()
std::set< std::string > triggerPaths_
void toString(std::string &result) const
std::list< std::string > StringList
MainParameterSet(ParameterSetID const &oldID, std::string const &psetString)
ParameterSet const & registerIt()
std::set< std::string > triggerPaths_
static Registry * instance()