22 namespace eventsetup {
25 unsigned subProcessIndex,
27 std::vector<std::string> prefers =
params.getParameter<std::vector<std::string> >(
"@all_esprefers");
29 if (prefers.empty()) {
30 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex);
41 for (std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end(); itName != itNameEnd;
46 for (std::vector<std::string>::iterator itRecordName = recordNames.begin(), itRecordNameEnd = recordNames.end();
47 itRecordName != itRecordNameEnd;
49 if ((*itRecordName)[0] ==
'@') {
56 std::vector<std::string> dataInfo = preferPSet.
getParameter<std::vector<std::string> >(*itRecordName);
58 if (dataInfo.empty()) {
61 <<
"The record named " << *itRecordName <<
" specifies no data items";
64 for (std::vector<std::string>::iterator itDatum = dataInfo.begin(), itDatumEnd = dataInfo.end();
65 itDatum != itDatumEnd;
67 std::string datumName(*itDatum, 0, itDatum->find_first_of(
"/"));
70 if (itDatum->size() != datumName.size()) {
71 labelName =
std::string(*itDatum, datumName.size() + 1);
73 recordToData.insert(std::make_pair(
std::string(*itRecordName), std::make_pair(datumName, labelName)));
77 theError <<
"While parsing the es_prefer statement for type=" 80 theError.
append(iException);
87 false)] = recordToData;
89 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex, &preferInfo);
97 std::vector<std::string> providers =
params.getParameter<std::vector<std::string> >(
"@all_esmodules");
99 for (std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
106 std::vector<std::string>
sources =
params.getParameter<std::vector<std::string> >(
"@all_essources");
108 for (std::vector<std::string>::iterator itName =
sources.begin(), itNameEnd =
sources.end(); itName != itNameEnd;
T getParameter(std::string const &) const
void append(Exception const &another)
std::multimap< RecordName, DataKeyInfo > RecordToDataMap
std::unique_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const ¶ms, unsigned subProcessIndex, ActivityRegistry *activityRegistry)
std::map< ComponentDescription, RecordToDataMap > PreferredProviderInfo
void fillEventSetupProvider(ModuleTypeResolverBase const *resolver, EventSetupsController &esController, EventSetupProvider &cp, ParameterSet ¶ms)
static constexpr unsigned int unknownID() noexcept
static ComponentFactory< T > const * get()
std::vector< std::string > getParameterNames() const