23 namespace eventsetup {
25 std::auto_ptr<EventSetupProvider>
27 std::vector<std::string> prefers =
28 params.
getParameter<std::vector<std::string> >(
"@all_esprefers");
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(
"/"));
75 std::string labelName;
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;
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();
139 std::string moduleLabel;
140 modtype = pset.
getParameter<std::string>(
"@module_type");
141 moduleLabel = pset.
getParameter<std::string>(
"@module_label");
147 if (moduleLabel == std::string(
"")) {
148 moduleLabel = modtype;
151 std::auto_ptr<ParameterSetDescriptionFillerBase> filler(
154 filler->fill(descriptions);
157 descriptions.
validate(pset, moduleLabel);
167 std::ostringstream ost;
168 ost <<
"Validating configuration of ESProducer or ESSource of type " << modtype
169 <<
" with label: '" << moduleLabel <<
"'";
T getParameter(std::string const &) const
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)
void stdToEDM(std::exception const &e)
std::vector< std::string > getParameterNames() const
void charPtrToEDM(char const *c)
void stringToEDM(std::string &s)
ParameterSet const & getParameterSet(std::string const &) const
void addContext(std::string const &context)
std::auto_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const ¶ms)
void validate(ParameterSet &pset, std::string const &moduleLabel) const
ParameterSet const & registerIt()
static ComponentFactory< T > * get()
T get(const Candidate &c)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)