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);
87 false)] = recordToData;
89 return std::make_unique<EventSetupProvider>(activityRegistry, subProcessIndex, &preferInfo);
94 std::vector<std::string> providers = params.
getParameter<std::vector<std::string> >(
"@all_esmodules");
96 for (std::vector<std::string>::iterator itName = providers.begin(), itNameEnd = providers.end();
105 std::vector<std::string> sources = params.
getParameter<std::vector<std::string> >(
"@all_essources");
107 for (std::vector<std::string>::iterator itName = sources.begin(), itNameEnd = sources.end(); itName != itNameEnd;
128 moduleLabel = modtype;
131 std::unique_ptr<ParameterSetDescriptionFillerBase>
filler(
134 filler->fill(descriptions);
138 std::ostringstream ost;
139 ost <<
"Validating configuration of ESProducer or ESSource of type " << modtype <<
" with label: '" 140 << 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)