#include <JobReport.h>
Classes | |
class | AtomicLongLong |
struct | InputFile |
struct | JobReportImpl |
struct | OutputFile |
struct | RunReport |
Public Types | |
typedef unsigned int | RunNumber |
typedef std::size_t | Token |
Public Member Functions | |
std::string | dumpFiles (void) |
debug/test util More... | |
void | eventReadFromFile (InputType inputType, Token fileToken) |
void | eventWrittenToFile (Token fileToken, RunNumber_t run, EventNumber_t event) |
void | inputFileClosed (InputType inputType, Token fileToken) |
Token | inputFileOpened (std::string const &physicalFileName, std::string const &logicalFileName, std::string const &catalog, std::string const &inputType, std::string const &inputSourceClassName, std::string const &moduleLabel, std::string const &guid, std::vector< std::string > const &branchNames) |
JobReport () | |
JobReport (std::ostream *outputStream) | |
JobReport (JobReport const &)=delete | |
JobReport & | operator= (JobReport const &)=delete |
void | outputFileClosed (Token fileToken) |
Token | outputFileOpened (std::string const &physicalFileName, std::string const &logicalFileName, std::string const &catalog, std::string const &outputModuleClassName, std::string const &moduleLabel, std::string const &guid, std::string const &dataType, std::string const &branchHash, std::vector< std::string > const &branchNames) |
void | reportAnalysisFile (std::string const &fileName, std::map< std::string, std::string > const &fileData) |
void | reportDataType (Token fileToken, std::string const &dataType) |
void | reportError (std::string const &shortDesc, std::string const &longDesc, int const &exitCode) |
void | reportFallbackAttempt (std::string const &pfn, std::string const &lfn, std::string const &err) |
void | reportFastClonedBranches (std::set< std::string > const &fastClonedBranches, long long nEvents) |
Inform the job report that branches have been fast Cloned. More... | |
void | reportFastCopyingStatus (Token t, std::string const &inputFileName, bool fastCopying) |
void | reportInputLumiSection (unsigned int run, unsigned int lumiSectId) |
void | reportInputRunNumber (unsigned int run) |
void | reportLumiSection (JobReport::Token token, unsigned int run, unsigned int lumiSectId, unsigned long nEvents=0) |
void | reportMemoryInfo (std::vector< std::string > const &memoryData) |
void | reportMessageInfo (std::map< std::string, double > const &messageData) |
void | reportPerformanceForModule (std::string const &metricClass, std::string const &moduleName, std::map< std::string, std::string > const &metrics) |
void | reportPerformanceSummary (std::string const &metricClass, std::map< std::string, std::string > const &metrics) |
void | reportRandomStateFile (std::string const &name) |
void | reportReadBranch (InputType inputType, std::string const &branchName) |
Inform the job report that a branch has been read. More... | |
void | reportReadBranches () |
void | reportRunNumber (JobReport::Token token, unsigned int run) |
void | reportShutdownSignal () |
void | reportSkippedEvent (RunNumber_t run, EventNumber_t event) |
void | reportSkippedFile (std::string const &pfn, std::string const &lfn) |
~JobReport () | |
Protected Member Functions | |
edm::propagate_const< std::unique_ptr< JobReportImpl > > & | impl () |
Private Member Functions | |
void | temporarilyCloseXML () |
Private Attributes | |
bool | errorLogged_ = false |
edm::propagate_const< std::unique_ptr< JobReportImpl > > | impl_ |
std::mutex | write_mutex |
Description: A service that collections job handling information.
Usage: The JobReport service collects 'job handling' information (currently file handling) from several sources, collates the information, and at appropriate intervals, reports the information to the job report, through the MessageLogger.
CMS-THREADING Some notes about thread safety:
open primary input file nothing else running concurrently Also respondToOpenInputFiles serially
open output files serially nothing else running concurrently
The primary source runs its other tasks concurrently with the secondary sources running their tasks and modules running their tasks.
close primary input file nothing else running concurrently
close output files serially nothing else running concurrently
repeat the above (the output file opens and closes are optional except for the first and last)
All endJob and postEndJob activities occur serially not concurrently
Definition at line 103 of file JobReport.h.
typedef unsigned int edm::JobReport::RunNumber |
Definition at line 105 of file JobReport.h.
typedef std::size_t edm::JobReport::Token |
Definition at line 106 of file JobReport.h.
edm::JobReport::JobReport | ( | ) |
Definition at line 345 of file JobReport.cc.
edm::JobReport::JobReport | ( | std::ostream * | outputStream | ) |
Definition at line 347 of file JobReport.cc.
References impl_, and temporarilyCloseXML().
|
delete |
edm::JobReport::~JobReport | ( | ) |
Definition at line 308 of file JobReport.cc.
References mps_fire::end, mps_fire::i, impl_, edm::kJobReportEndElement, and edm::kMinSizeOfComment.
std::string edm::JobReport::dumpFiles | ( | void | ) |
debug/test util
Definition at line 743 of file JobReport.cc.
References hcalRecHitTable_cff::doc, f, edm::findOrDefault(), impl_, and mps_check::msg.
void edm::JobReport::eventReadFromFile | ( | InputType | inputType, |
JobReport::Token | fileToken | ||
) |
Report that an event has been read from the file identified by the given Token.
Definition at line 400 of file JobReport.cc.
void edm::JobReport::eventWrittenToFile | ( | JobReport::Token | fileToken, |
RunNumber_t | run, | ||
EventNumber_t | event | ||
) |
Report that the event with the given id has been written to the file identified by the given Token.
Definition at line 462 of file JobReport.cc.
Referenced by NanoAODRNTupleOutputModule::write(), and NanoAODOutputModule::write().
|
inlineprotected |
Definition at line 432 of file JobReport.h.
References impl_.
Referenced by edm::service::JobReportService::frameworkShutdownOnFailure(), and edm::service::JobReportService::postEndJob().
void edm::JobReport::inputFileClosed | ( | InputType | inputType, |
JobReport::Token | fileToken | ||
) |
Report that the input file identified by the given Token has been closed. An exception will be thrown if the given Token was not obtained from inputFileOpened.
Definition at line 410 of file JobReport.cc.
References f, impl_, CommonMethods::lock(), edm::Primary, temporarilyCloseXML(), and write_mutex.
Referenced by DQMRootSource::OpenFileInfo::~OpenFileInfo().
JobReport::Token edm::JobReport::inputFileOpened | ( | std::string const & | physicalFileName, |
std::string const & | logicalFileName, | ||
std::string const & | catalog, | ||
std::string const & | inputType, | ||
std::string const & | inputSourceClassName, | ||
std::string const & | moduleLabel, | ||
std::string const & | guid, | ||
std::vector< std::string > const & | branchNames | ||
) |
Report that an input file has been opened. The returned Token should be used for later identification of this file.
Definition at line 354 of file JobReport.cc.
References haddnano::branchNames, edm::JobReport::InputFile::branchNames, getEcalConditions_orcoffint2r_cff::catalog, edm::JobReport::InputFile::catalog, edm::JobReport::InputFile::fileHasBeenClosed, edm::JobReport::InputFile::guid, impl_, RPC_Client_on_RootFile::InputFile, edm::JobReport::InputFile::inputSourceClassName, edm::JobReport::InputFile::inputType, edm::JobReport::InputFile::logicalFileName, HerwigMaxPtPartonFilter_cfi::moduleLabel, edm::JobReport::InputFile::moduleLabel, edm::JobReport::InputFile::numEventsRead, edm::JobReport::InputFile::physicalFileName, edm::Primary, edm::SecondaryFile, and edm::SecondarySource.
Referenced by DQMRootSource::readFile_().
void edm::JobReport::outputFileClosed | ( | JobReport::Token | fileToken | ) |
Report that the output file identified by the given Token has been closed. An exception will be thrown if the given Token was not obtained from outputFileOpened.
Definition at line 467 of file JobReport.cc.
References f, impl_, CommonMethods::lock(), temporarilyCloseXML(), and write_mutex.
Referenced by DQMRootOutputModule::finishEndFile(), NanoAODRNTupleOutputModule::reallyCloseFile(), and NanoAODOutputModule::reallyCloseFile().
JobReport::Token edm::JobReport::outputFileOpened | ( | std::string const & | physicalFileName, |
std::string const & | logicalFileName, | ||
std::string const & | catalog, | ||
std::string const & | outputModuleClassName, | ||
std::string const & | moduleLabel, | ||
std::string const & | guid, | ||
std::string const & | dataType, | ||
std::string const & | branchHash, | ||
std::vector< std::string > const & | branchNames | ||
) |
Report that an output file has been opened. The returned Token should be used for later identification of this file.
Definition at line 422 of file JobReport.cc.
References haddnano::branchNames, getEcalConditions_orcoffint2r_cff::catalog, DTskim_cfg::dataType, mps_fire::i, impl_, and HerwigMaxPtPartonFilter_cfi::moduleLabel.
void edm::JobReport::reportAnalysisFile | ( | std::string const & | fileName, |
std::map< std::string, std::string > const & | fileData | ||
) |
Definition at line 509 of file JobReport.cc.
References hcalRecHitTable_cff::doc, MillePedeFileConverter_cfg::fileName, impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
Referenced by TFileService::afterBeginJob(), DQMStoreStats::calcstats(), AlcaBeamSpotHarvester::endRun(), PCLMetadataWriter::endRun(), DQMFileSaver::saveJobReport(), and dqm::DQMFileSaverBase::saveJobReport().
void edm::JobReport::reportDataType | ( | Token | fileToken, |
std::string const & | dataType | ||
) |
Report the data type of a file after it has been opened Needed since the data type isn't known until an event has been read
Definition at line 405 of file JobReport.cc.
References DTskim_cfg::dataType, f, and impl_.
void edm::JobReport::reportError | ( | std::string const & | shortDesc, |
std::string const & | longDesc, | ||
int const & | exitCode | ||
) |
Report an exception, providing details of the problem as a short description (Eg "XXXError") and a long description (Eg "XXX crashed because...") Also overload this method to accept an optional standard exit code
Definition at line 529 of file JobReport.cc.
References errorLogged_, impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
Referenced by edm::printCmsException().
void edm::JobReport::reportFallbackAttempt | ( | std::string const & | pfn, |
std::string const & | lfn, | ||
std::string const & | err | ||
) |
Definition at line 571 of file JobReport.cc.
References hcalRecHitTable_cff::doc, submitPVResolutionJobs::err, trackingPlots::fallback, impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
void edm::JobReport::reportFastClonedBranches | ( | std::set< std::string > const & | fastClonedBranches, |
long long | nEvents | ||
) |
Inform the job report that branches have been fast Cloned.
Definition at line 677 of file JobReport.cc.
References impl_, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and createIOVlist::nEvents.
void edm::JobReport::reportFastCopyingStatus | ( | JobReport::Token | fileToken, |
std::string const & | inputFileName, | ||
bool | fastCopying | ||
) |
Definition at line 487 of file JobReport.cc.
References f, impl_, and InefficientDoubleROC::inputFileName.
void edm::JobReport::reportInputLumiSection | ( | unsigned int | run, |
unsigned int | lumiSectId | ||
) |
API for reporting a Lumi Section to the job report. for input files, call only if lumi section is physically read from the input file
Definition at line 501 of file JobReport.cc.
References impl_, and writedatasetfile::run.
Referenced by dqmservices::DQMProtobufReader::readLuminosityBlock_(), and DQMRootSource::readLuminosityBlock_().
void edm::JobReport::reportInputRunNumber | ( | unsigned int | run | ) |
API to report a run read from input
Definition at line 507 of file JobReport.cc.
References impl_, and writedatasetfile::run.
Referenced by DQMRootSource::readRun_().
void edm::JobReport::reportLumiSection | ( | JobReport::Token | token, |
unsigned int | run, | ||
unsigned int | lumiSectId, | ||
unsigned long | nEvents = 0 |
||
) |
API for reporting a Lumi Section to the job report. for output files, call only if lumi section is written to the output file
Definition at line 494 of file JobReport.cc.
References impl_, createIOVlist::nEvents, writedatasetfile::run, and unpackBuffers-CaloStage2::token.
Referenced by NanoAODRNTupleOutputModule::writeLuminosityBlock(), NanoAODOutputModule::writeLuminosityBlock(), and DQMRootOutputModule::writeLuminosityBlock().
void edm::JobReport::reportMemoryInfo | ( | std::vector< std::string > const & | memoryData | ) |
Report Memory statistics ALTERNATE FORM - USING THIS MAY NECESSITATE CHANGES IN PARSING XML! Invoked by the Memory service to send an end of job summary about memory usage for inclusion in the job report
Definition at line 589 of file JobReport.cc.
References impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
void edm::JobReport::reportMessageInfo | ( | std::map< std::string, double > const & | messageData | ) |
Report Message statistics Invoked by the MessageLogger service to send an end of job summary about numbers of various categories messages issued for inclusion in the job report
Definition at line 604 of file JobReport.cc.
References impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
Referenced by edm::service::MessageLogger::summarizeInJobReport().
void edm::JobReport::reportPerformanceForModule | ( | std::string const & | metricClass, |
std::string const & | moduleName, | ||
std::map< std::string, std::string > const & | metrics | ||
) |
Definition at line 722 of file JobReport.cc.
References impl_, mergeResourcesJson::metrics, edm::moduleName(), mps_check::msg, and temporarilyCloseXML().
Referenced by XrdAdaptor::XrdStatisticsService::postEndJob().
void edm::JobReport::reportPerformanceSummary | ( | std::string const & | metricClass, |
std::map< std::string, std::string > const & | metrics | ||
) |
Performance Reports
Two categories: Summary for entire job and module for a specific module Each one requires a performance metric class such as Timing, Memory, CPU, Trigger etc.
Definition at line 703 of file JobReport.cc.
References impl_, mergeResourcesJson::metrics, mps_check::msg, and temporarilyCloseXML().
Referenced by TFileAdaptor::termination().
void edm::JobReport::reportRandomStateFile | ( | std::string const & | name | ) |
Report the name of the random engine persistency file
Definition at line 689 of file JobReport.cc.
References hcalRecHitTable_cff::doc, impl_, CommonMethods::lock(), mps_check::msg, Skims_PA_cff::name, temporarilyCloseXML(), and write_mutex.
void edm::JobReport::reportReadBranch | ( | InputType | inputType, |
std::string const & | branchName | ||
) |
Inform the job report that a branch has been read.
Definition at line 662 of file JobReport.cc.
References electrons_cff::branchName, impl_, edm::Primary, edm::SecondaryFile, and edm::SecondarySource.
void edm::JobReport::reportReadBranches | ( | ) |
Report read branches Invoked by the source that reads ROOT/EDM files at the end of a job to report which product branches in the Events tree have been read, with a count of the number of events for which the branch was read.
Definition at line 619 of file JobReport.cc.
References MicroEventContent_cff::branch, hcalRecHitTable_cff::doc, impl_, CommonMethods::lock(), temporarilyCloseXML(), and write_mutex.
void edm::JobReport::reportRunNumber | ( | JobReport::Token | token, |
unsigned int | run | ||
) |
API for reporting a Run to the job report. for output files, call only if Run is written to the output file
Definition at line 505 of file JobReport.cc.
References impl_, writedatasetfile::run, and unpackBuffers-CaloStage2::token.
Referenced by NanoAODRNTupleOutputModule::writeRun(), NanoAODOutputModule::writeRun(), and DQMRootOutputModule::writeRun().
void edm::JobReport::reportShutdownSignal | ( | ) |
Report a unix signal sent to early terminate the job
Definition at line 543 of file JobReport.cc.
References impl_, CommonMethods::lock(), mps_check::msg, temporarilyCloseXML(), and write_mutex.
Referenced by edm::EventProcessor::checkForAsyncStopRequest().
void edm::JobReport::reportSkippedEvent | ( | RunNumber_t | run, |
EventNumber_t | event | ||
) |
Definition at line 475 of file JobReport.cc.
References impl_, CommonMethods::lock(), mps_check::msg, writedatasetfile::run, temporarilyCloseXML(), and write_mutex.
void edm::JobReport::reportSkippedFile | ( | std::string const & | pfn, |
std::string const & | lfn | ||
) |
Report Skipped File
Report that a file has been skipped due to it not being found.
Definition at line 554 of file JobReport.cc.
References hcalRecHitTable_cff::doc, impl_, CommonMethods::lock(), mps_check::msg, runEdmFileComparison::skipped, temporarilyCloseXML(), and write_mutex.
|
private |
Definition at line 331 of file JobReport.cc.
References errorLogged_, impl_, and edm::kJobReportEndElement.
Referenced by inputFileClosed(), JobReport(), outputFileClosed(), reportAnalysisFile(), reportError(), reportFallbackAttempt(), reportMemoryInfo(), reportMessageInfo(), reportPerformanceForModule(), reportPerformanceSummary(), reportRandomStateFile(), reportReadBranches(), reportShutdownSignal(), reportSkippedEvent(), and reportSkippedFile().
|
private |
Definition at line 438 of file JobReport.h.
Referenced by reportError(), and temporarilyCloseXML().
|
private |
Definition at line 436 of file JobReport.h.
Referenced by dumpFiles(), eventReadFromFile(), eventWrittenToFile(), impl(), inputFileClosed(), inputFileOpened(), JobReport(), outputFileClosed(), outputFileOpened(), reportAnalysisFile(), reportDataType(), reportError(), reportFallbackAttempt(), reportFastClonedBranches(), reportFastCopyingStatus(), reportInputLumiSection(), reportInputRunNumber(), reportLumiSection(), reportMemoryInfo(), reportMessageInfo(), reportPerformanceForModule(), reportPerformanceSummary(), reportRandomStateFile(), reportReadBranch(), reportReadBranches(), reportRunNumber(), reportShutdownSignal(), reportSkippedEvent(), reportSkippedFile(), temporarilyCloseXML(), and ~JobReport().
|
private |
Definition at line 437 of file JobReport.h.
Referenced by inputFileClosed(), outputFileClosed(), reportAnalysisFile(), reportError(), reportFallbackAttempt(), reportMemoryInfo(), reportMessageInfo(), reportRandomStateFile(), reportReadBranches(), reportShutdownSignal(), reportSkippedEvent(), and reportSkippedFile().