50 std::pair<unsigned long long, std::map<eventsetup::DataKey, bool> > >
72 : m_printProviders(iPS.getUntrackedParameter<
bool>(
"printProviders")),
73 m_checkDuringBeginRun(iPS.getUntrackedParameter<
bool>(
"checkDuringBeginRun")),
74 m_checkDuringBeginLumi(iPS.getUntrackedParameter<
bool>(
"checkDuringBeginLumi")),
75 m_checkDuringEvent(iPS.getUntrackedParameter<
bool>(
"checkDuringEvent")) {}
89 ->setComment(
"If 'true' also print which ES module provides the data");
91 ->setComment(
"If 'true' check for retrieved data during each begin run is processed");
93 ->setComment(
"If 'true' check for retrieved data during each begin lumi is processed");
95 ->setComment(
"If 'true' check for retrieved data during an event is processed");
96 descriptions.
add(
"PrintEventSetupDataRetrieval", desc);
97 descriptions.
setComment(
"This analyzer reports when EventSetup data is retrieved by a module in the job.");
142 std::unique_ptr<LogSystem>
msg;
143 for (std::vector<eventsetup::EventSetupRecordKey>::const_iterator it =
m_recordKeys.begin(),
148 auto r = iES.
find(*it);
155 .insert(std::make_pair(*it, std::pair<
unsigned long long, std::map<eventsetup::DataKey, bool> >()))
157 itRetrievedData->second.first =
r->cacheIdentifier();
158 std::vector<eventsetup::DataKey>
keys;
159 r->fillRegisteredDataKeys(
keys);
160 for (std::vector<eventsetup::DataKey>::const_iterator itData =
keys.begin(), itDataEnd =
keys.end();
163 itRetrievedData->second.second.insert(std::make_pair(*itData,
false));
167 if (itRetrievedData->second.first !=
r->cacheIdentifier()) {
168 itRetrievedData->second.first =
r->cacheIdentifier();
169 for (std::map<eventsetup::DataKey, bool>::iterator itDatum = retrievedData.second.second.begin(),
170 itDatumEnd = retrievedData.second.second.end();
171 itDatum != itDatumEnd;
173 itDatum->second =
false;
177 for (std::map<eventsetup::DataKey, bool>::iterator itDatum = retrievedData.second.second.begin(),
178 itDatumEnd = retrievedData.second.second.end();
179 itDatum != itDatumEnd;
181 bool wasGotten =
r->wasGotten(itDatum->first);
182 if (wasGotten != itDatum->second) {
187 itDatum->second = wasGotten;
188 *
msg <<
"Retrieved> record:" << it->name() <<
" data:" << itDatum->first.type().name() <<
" '"
189 << itDatum->first.name().value() <<
"'";
193 *
msg <<
" provider:" <<
d->type_ <<
" '" <<
d->label_ <<
"'";