48 typedef std::map<eventsetup::EventSetupRecordKey, std::pair<unsigned long long, std::map<eventsetup::DataKey,bool> > >
RetrievedDataMap;
71 m_printProviders(iPS.getUntrackedParameter<bool>(
"printProviders")),
72 m_checkDuringBeginRun(iPS.getUntrackedParameter<bool>(
"checkDuringBeginRun")),
73 m_checkDuringBeginLumi(iPS.getUntrackedParameter<bool>(
"checkDuringBeginLumi")),
74 m_checkDuringEvent(iPS.getUntrackedParameter<bool>(
"checkDuringEvent"))
89 desc.
addUntracked<
bool>(
"printProviders",
false)->setComment(
90 "If 'true' also print which ES module provides the data");
91 desc.
addUntracked<
bool>(
"checkDuringBeginRun",
false)->setComment(
92 "If 'true' check for retrieved data during each begin run is processed");
93 desc.
addUntracked<
bool>(
"checkDuringBeginLumi",
false)->setComment(
94 "If 'true' check for retrieved data during each begin lumi is processed");
95 desc.
addUntracked<
bool>(
"checkDuringEvent",
true)->setComment(
96 "If 'true' check for retrieved data during an event is processed");
97 descriptions.
add(
"PrintEventSetupDataRetrieval", desc);
98 descriptions.
setComment(
"This analyzer reports when EventSetup data is retrieved by a module in the job.");
144 for(std::vector<eventsetup::EventSetupRecordKey>::const_iterator it =
m_recordKeys.begin(), itEnd =
m_recordKeys.end();
153 itRetrievedData =
m_retrievedDataMap.insert(std::make_pair(*it,std::pair<
unsigned long long, std::map<eventsetup::DataKey,bool> >())).first;
155 std::vector<eventsetup::DataKey>
keys;
157 for(std::vector<eventsetup::DataKey>::const_iterator itData = keys.begin(), itDataEnd = keys.end();
160 itRetrievedData->second.second.insert(std::make_pair(*itData,
false));
166 for(std::map<eventsetup::DataKey,bool>::iterator itDatum = retrievedData.second.second.begin(), itDatumEnd = retrievedData.second.second.end();
167 itDatum != itDatumEnd;
169 itDatum->second =
false;
173 for(std::map<eventsetup::DataKey,bool>::iterator itDatum = retrievedData.second.second.begin(), itDatumEnd = retrievedData.second.second.end();
174 itDatum != itDatumEnd;
176 bool wasGotten = r->
wasGotten(itDatum->first);
178 if(wasGotten != itDatum->second) {
179 itDatum->second = wasGotten;
183 edm::LogSystem(
"PrintEventSetupDataRetrieval")<<
"Retrieved> Record:"<<it->name()<<
" data:"<<itDatum->first.type().name()<<
" '"<<itDatum->first.name().value()
186 edm::LogSystem(
"PrintEventSetupDataRetrieval")<<
"Retrieved> Record:"<<it->name()<<
" data:"<<itDatum->first.type().name()<<
" '"<<itDatum->first.name().value()<<
"'";
unsigned long long cacheIdentifier() const
std::map< eventsetup::EventSetupRecordKey, std::pair< unsigned long long, std::map< eventsetup::DataKey, bool > > > RetrievedDataMap
void fillRegisteredDataKeys(std::vector< DataKey > &oToFill) const
clears the oToFill vector and then fills it with the keys for all registered data keys ...
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool wasGotten(DataKey const &aKey) const
#define DEFINE_FWK_MODULE(type)
void endRun(edm::Run const &, edm::EventSetup const &) override
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
ComponentDescription const * providerDescription(DataKey const &aKey) const
RetrievedDataMap m_retrievedDataMap
std::vector< eventsetup::EventSetupRecordKey > m_recordKeys
void fillAvailableRecordKeys(std::vector< eventsetup::EventSetupRecordKey > &oToFill) const
clears the oToFill vector and then fills it with the keys for all available records ...
void analyze(edm::Event const &, edm::EventSetup const &) override
bool m_checkDuringBeginRun
bool m_checkDuringBeginLumi
Container::value_type value_type
PrintEventSetupDataRetrieval(edm::ParameterSet const &)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void check(EventSetup const &)
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override