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) {
102 pset.setID(
i->second);
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);
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::vector<std::string_view>
pieces;
162 split(std::back_inserter(
pieces),
k.first,
'<',
';',
'>');
164 std::string_view removeName =
i.substr(
i.find(
'+'));
165 if (removeName.size() >= 4) {
166 if (removeName[1] ==
'P') {
167 std::string psetString(removeName.begin() + 3, removeName.end() - 1);
170 }
else if (removeName[1] ==
'p') {
171 std::string_view pvec = removeName.substr(3, removeName.size() - 4);
172 std::vector<std::string_view>
temp;
173 split(std::back_inserter(
temp), pvec,
'{',
',',
'}');
174 for (
auto const&
j :
temp) {
T getParameter(std::string const &) const
TriggerPath(ParameterSet const &pset)
std::vector< std::string > StringVector
def replace(string, replacements)
StringWithIDList parameterSets_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
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)
Hash< ParameterSetType > ParameterSetID
void toString(std::string &result) const
bool search_all(ForwardSequence const &s, Datum const &d)
const_iterator end() const
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
bool split(OutIter result, std::string_view string_to_split, char first, char sep, char last)
void noConvertParameterSets()
std::set< std::string > triggerPaths_
const_iterator begin() const
MainParameterSet(ParameterSetID const &oldID, std::string const &psetString)
std::set< std::string > triggerPaths_
static Registry * instance()