23 namespace eventsetup {
25 std::unique_ptr<EventSetupProvider>
27 std::vector<std::string> prefers =
28 params.
getParameter<std::vector<std::string> >(
"@all_esprefers");
31 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex);
42 for(std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end();
48 for(std::vector<std::string>::iterator itRecordName = recordNames.begin(),
49 itRecordNameEnd = recordNames.end();
50 itRecordName != itRecordNameEnd;
53 if((*itRecordName)[0] ==
'@') {
60 std::vector<std::string> dataInfo =
61 preferPSet.
getParameter<std::vector<std::string> >(*itRecordName);
63 if(dataInfo.empty()) {
66 <<
"The record named " 67 << *itRecordName <<
" specifies no data items";
70 for(std::vector<std::string>::iterator itDatum = dataInfo.begin(),
71 itDatumEnd = dataInfo.end();
72 itDatum != itDatumEnd;
74 std::string datumName(*itDatum, 0, itDatum->find_first_of(
"/"));
77 if(itDatum->size() != datumName.size()) {
78 labelName =
std::string(*itDatum, datumName.size() + 1);
80 recordToData.insert(std::make_pair(
std::string(*itRecordName),
81 std::make_pair(datumName,
86 theError <<
"While parsing the es_prefer statement for type=" 90 <<
"\" an error occurred.";
91 theError.
append(iException);
97 false)] = recordToData;
99 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex, &preferInfo);
107 std::vector<std::string> providers =
108 params.
getParameter<std::vector<std::string> >(
"@all_esmodules");
110 for(std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
121 std::vector<std::string> sources =
122 params.
getParameter<std::vector<std::string> >(
"@all_essources");
124 for(std::vector<std::string>::iterator itName = sources.begin(), itNameEnd = sources.end();
148 moduleLabel = modtype;
151 std::unique_ptr<ParameterSetDescriptionFillerBase>
filler(
154 filler->fill(descriptions);
157 descriptions.validate(pset, moduleLabel);
161 std::ostringstream ost;
162 ost <<
"Validating configuration of ESProducer or ESSource of type " << modtype
163 <<
" with label: '" << moduleLabel <<
"'";
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
void append(Exception const &another)
std::multimap< RecordName, DataKeyInfo > RecordToDataMap
std::map< ComponentDescription, RecordToDataMap > PreferredProviderInfo
void validateEventSetupParameters(ParameterSet &pset)
void fillEventSetupProvider(EventSetupsController &esController, EventSetupProvider &cp, ParameterSet ¶ms)
std::vector< std::string > getParameterNames() const
ParameterSet const & getParameterSet(std::string const &) const
void addContext(std::string const &context)
std::unique_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const ¶ms, unsigned subProcessIndex, ActivityRegistry *)
static ComponentFactory< T > const * get()
auto wrap(F iFunc) -> decltype(iFunc())
ParameterSet const & registerIt()
T get(const Candidate &c)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)