Definition at line 262 of file EventContentAnalyzer.cc.
edm::EventContentAnalyzer::EventContentAnalyzer |
( |
ParameterSet const & |
iConfig | ) |
|
|
explicit |
Definition at line 289 of file EventContentAnalyzer.cc.
References moduleLabels_, and edm::sort_all().
290 indentation_(iConfig.getUntrackedParameter(
"indentation", std::string(
"++"))),
291 verboseIndentation_(iConfig.getUntrackedParameter(
"verboseIndentation", std::string(
" "))),
292 moduleLabels_(iConfig.getUntrackedParameter(
"verboseForModuleLabels", std::vector<std::string>())),
294 getModuleLabels_(iConfig.getUntrackedParameter(
"getDataForModuleLabels", std::vector<std::string>())),
297 listContent_(iConfig.getUntrackedParameter(
"listContent",
true)){
std::vector< std::string > getModuleLabels_
std::string verboseIndentation_
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
std::vector< std::string > moduleLabels_
edm::EventContentAnalyzer::~EventContentAnalyzer |
( |
| ) |
|
void edm::EventContentAnalyzer::analyze |
( |
Event const & |
iEvent, |
|
|
EventSetup const & |
|
|
) |
| |
|
virtual |
Implements edm::EDAnalyzer.
Definition at line 315 of file EventContentAnalyzer.cc.
References edm::binary_search_all(), className(), cumulates_, evno_, edm::friendlyname::friendlyName(), edm::Event::getAllProvenance(), edm::Event::getByLabel(), getData_, getModuleLabels_, patZpeak::handle, indentation_, combine::key, listContent_, moduleLabels_, verbose_, and verboseIndentation_.
316 typedef std::vector<Provenance const*> Provenances;
317 Provenances provenances;
319 iEvent.getAllProvenance(provenances);
322 LogAbsolute(
"EventContent") <<
"\n" <<
indentation_ <<
"Event " << std::setw(5) <<
evno_ <<
" contains "
323 << provenances.size() <<
" product" << (provenances.size() == 1 ?
"" :
"s")
324 <<
" with friendlyClassName, moduleLabel, productInstanceName and processName:"
329 for(Provenances::iterator itProv = provenances.begin(), itProvEnd = provenances.end();
332 std::string
const&
className = (*itProv)->className();
334 std::string
const&
friendlyName = (*itProv)->friendlyClassName();
337 std::string
const& modLabel = (*itProv)->moduleLabel();
340 std::string
const& instanceName = (*itProv)->productInstanceName();
343 std::string
const& processName = (*itProv)->processName();
349 LogAbsolute(
"EventContent") <<
indentation_ << friendlyName
351 <<
"\" \"" << instanceName <<
"\" \""
352 << processName <<
"\""
353 <<
" (productId = " << (*itProv)->productID() <<
")"
357 std::string
key = friendlyName
358 + std::string(
" + \"") + modLabel
359 + std::string(
"\" + \"") + instanceName +
"\" \"" + processName +
"\"";
370 verboseIndentation_);
379 LogAbsolute(
"EventContent") << startIndent <<
" \"" << className <<
"\"" <<
" is an unknown type" << std::endl;
383 iEvent.getByLabel(InputTag(modLabel,
std::vector< std::string > getModuleLabels_
std::string verboseIndentation_
std::map< std::string, int > cumulates_
std::string friendlyName(std::string const &iFullName)
std::vector< std::string > moduleLabels_
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
std::string className(const T &t)
void edm::EventContentAnalyzer::endJob |
( |
void |
| ) |
|
|
virtual |
Reimplemented from edm::EDAnalyzer.
Definition at line 396 of file EventContentAnalyzer.cc.
References cumulates_.
397 typedef std::map<std::string, int> nameMap;
399 LogAbsolute(
"EventContent") <<
"\nSummary for key being the concatenation of friendlyClassName, moduleLabel, productInstanceName and processName" << std::endl;
403 LogAbsolute(
"EventContent") << std::setw(6) << it->second <<
" occurrences of key " << it->first << std::endl;
std::map< std::string, int > cumulates_
Definition at line 413 of file EventContentAnalyzer.cc.
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addOptionalUntracked(), runTheMatrix::np, edm::ConfigurationDescriptions::setComment(), and edm::ParameterDescriptionNode::setComment().
415 descriptions.setComment(
"This plugin will print a list of all products in the event "
416 "provenance. It also has options to print and/or get each product.");
420 ParameterDescriptionNode*
np;
422 std::string defaultString(
"++");
423 np = desc.addOptionalUntracked<std::string>(
"indentation", defaultString);
424 np->setComment(
"This string is printed at the beginning of every line printed during event processing.");
426 np = desc.addOptionalUntracked<
bool>(
"verbose",
false);
427 np->setComment(
"If true, the contents of products are printed using Reflex.");
430 np = desc.addOptionalUntracked<std::string>(
"verboseIndentation", defaultString);
431 np->setComment(
"This string is used to further indent lines when printing the contents of products in verbose mode.");
433 std::vector<std::string> defaultVString;
435 np = desc.addOptionalUntracked<std::vector<std::string> >(
"verboseForModuleLabels", defaultVString);
436 np->setComment(
"If this vector is not empty, then only products with module labels on this list are printed using Reflex.");
438 np = desc.addOptionalUntracked<
bool>(
"getData",
false);
439 np->setComment(
"If true the products will be retrieved using getByLabel.");
441 np = desc.addOptionalUntracked<std::vector<std::string> >(
"getDataForModuleLabels", defaultVString);
442 np->setComment(
"If this vector is not empty, then only products with module labels on this list are retrieved by getByLabel.");
444 np = desc.addOptionalUntracked<
bool>(
"listContent",
true);
445 np->setComment(
"If true then print a list of all the event content.");
448 descriptions.add(
"printContent", desc);
std::map<std::string, int> edm::EventContentAnalyzer::cumulates_ |
|
private |
int edm::EventContentAnalyzer::evno_ |
|
private |
bool edm::EventContentAnalyzer::getData_ |
|
private |
std::vector<std::string> edm::EventContentAnalyzer::getModuleLabels_ |
|
private |
std::string edm::EventContentAnalyzer::indentation_ |
|
private |
bool edm::EventContentAnalyzer::listContent_ |
|
private |
std::vector<std::string> edm::EventContentAnalyzer::moduleLabels_ |
|
private |
bool edm::EventContentAnalyzer::verbose_ |
|
private |
std::string edm::EventContentAnalyzer::verboseIndentation_ |
|
private |