21 namespace eventsetup {
23 std::auto_ptr<EventSetupProvider>
25 std::vector<std::string> prefers =
26 params.
getParameter<std::vector<std::string> >(
"@all_esprefers");
40 for(std::vector<std::string>::iterator itName = prefers.begin(), itNameEnd = prefers.end();
46 for(std::vector<std::string>::iterator itRecordName = recordNames.begin(),
47 itRecordNameEnd = recordNames.end();
48 itRecordName != itRecordNameEnd;
51 if((*itRecordName)[0] ==
'@') {
58 std::vector<std::string> dataInfo =
59 preferPSet.
getParameter<std::vector<std::string> >(*itRecordName);
61 if(dataInfo.empty()) {
64 <<
"The record named "
65 << *itRecordName <<
" specifies no data items";
68 for(std::vector<std::string>::iterator itDatum = dataInfo.begin(),
69 itDatumEnd = dataInfo.end();
70 itDatum != itDatumEnd;
72 std::string datumName(*itDatum, 0, itDatum->find_first_of(
"/"));
73 std::string labelName;
75 if(itDatum->size() != datumName.size()) {
76 labelName = std::string(*itDatum, datumName.size() + 1);
78 recordToData.insert(std::make_pair(std::string(*itRecordName),
79 std::make_pair(datumName,
84 theError <<
"While parsing the es_prefer statement for type="
88 <<
"\" an error occurred.";
89 theError.
append(iException);
95 false)] = recordToData;
105 std::vector<std::string> providers =
106 params.
getParameter<std::vector<std::string> >(
"@all_esmodules");
108 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();
143 modtype = pset.
getParameter<std::string>(
"@module_type");
144 moduleLabel = pset.
getParameter<std::string>(
"@module_label");
150 if (moduleLabel == std::string(
"")) {
151 moduleLabel = modtype;
154 std::auto_ptr<ParameterSetDescriptionFillerBase> filler(
157 filler->fill(descriptions);
158 descriptions.
validate(pset, moduleLabel);
162 toThrow <<
"\nThe plugin name is \"" << modtype <<
"\"\n";
163 toThrow <<
"The module label is \"" << moduleLabel <<
"\"\n";
164 toThrow.
append(iException);
T getParameter(std::string const &) const
void fillEventSetupProvider(EventSetupProvider &cp, ParameterSet ¶ms, CommonParams const &common)
void append(Exception const &another)
void validateEventSetupParameters(ParameterSet &pset)
ReleaseVersion releaseVersion_
std::vector< std::string > getParameterNames() const
ParameterSet const & getParameterSet(std::string const &) const
std::auto_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const ¶ms)
std::map< ComponentDescription, RecordToDataMap > PreferredProviderInfo
std::multimap< RecordName, DataKeyInfo > RecordToDataMap
void validate(ParameterSet &pset, std::string const &moduleLabel) const
ParameterSet const & registerIt()
static ComponentFactory< T > * get()
T get(const Candidate &c)
const std::string * moduleLabel() const
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)