23 namespace eventsetup {
26 unsigned subProcessIndex,
28 std::vector<std::string> prefers =
params.getParameter<std::vector<std::string> >(
"@all_esprefers");
30 if (prefers.empty()) {
31 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex);
42 for (std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end(); itName != itNameEnd;
47 for (std::vector<std::string>::iterator itRecordName = recordNames.begin(), itRecordNameEnd = recordNames.end();
48 itRecordName != itRecordNameEnd;
50 if ((*itRecordName)[0] ==
'@') {
57 std::vector<std::string> dataInfo = preferPSet.
getParameter<std::vector<std::string> >(*itRecordName);
59 if (dataInfo.empty()) {
62 <<
"The record named " << *itRecordName <<
" specifies no data items";
65 for (std::vector<std::string>::iterator itDatum = dataInfo.begin(), itDatumEnd = dataInfo.end();
66 itDatum != itDatumEnd;
68 std::string datumName(*itDatum, 0, itDatum->find_first_of(
"/"));
71 if (itDatum->size() != datumName.size()) {
72 labelName =
std::string(*itDatum, datumName.size() + 1);
74 recordToData.insert(std::make_pair(
std::string(*itRecordName), std::make_pair(datumName, labelName)));
78 theError <<
"While parsing the es_prefer statement for type=" 81 theError.
append(iException);
88 false)] = recordToData;
90 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex, &preferInfo);
95 std::vector<std::string> providers =
params.getParameter<std::vector<std::string> >(
"@all_esmodules");
97 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;
132 std::unique_ptr<ParameterSetDescriptionFillerBase>
filler(
135 filler->fill(descriptions);
139 std::ostringstream ost;
140 ost <<
"Validating configuration of ESProducer or ESSource of type " << modtype <<
" with label: '" T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
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 validateEventSetupParameters(ParameterSet &pset)
void fillEventSetupProvider(EventSetupsController &esController, EventSetupProvider &cp, ParameterSet ¶ms)
ParameterSet const & registerIt()
void addContext(std::string const &context)
static constexpr unsigned int unknownID() noexcept
static ComponentFactory< T > const * get()
auto wrap(F iFunc) -> decltype(iFunc())
std::vector< std::string > getParameterNames() const