#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 | |
void | childAfterFork (std::string const &jobReportFile, unsigned int childIndex, unsigned int numberOfChildren) |
New output file for child. More... | |
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 | parentAfterFork (std::string const &jobReportFile) |
void | parentBeforeFork (std::string const &jobReportFile, unsigned int numberOfChildren) |
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) |
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 | reportSkippedEvent (RunNumber_t run, EventNumber_t event) |
void | reportSkippedFile (std::string const &pfn, std::string const &lfn) |
~JobReport () | |
Protected Member Functions | |
boost::scoped_ptr < JobReportImpl > & | impl () |
Private Attributes | |
boost::scoped_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 102 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 326 of file JobReport.cc.
edm::JobReport::JobReport | ( | std::ostream * | outputStream | ) |
|
delete |
edm::JobReport::~JobReport | ( | ) |
void edm::JobReport::childAfterFork | ( | std::string const & | jobReportFile, |
unsigned int | childIndex, | ||
unsigned int | numberOfChildren | ||
) |
New output file for child.
Definition at line 383 of file JobReport.cc.
References impl_, and AlCaHLTBitMon_ParallelJobs::p.
std::string edm::JobReport::dumpFiles | ( | void | ) |
debug/test util
Definition at line 777 of file JobReport.cc.
References f, edm::findOrDefault(), impl_, edm::JobReport::InputFile::logicalFileName, visualization-live-secondInstance_cfg::msg, and edm::JobReport::InputFile::physicalFileName.
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 441 of file JobReport.cc.
References f, impl_, and edm::JobReport::InputFile::numEventsRead.
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 507 of file JobReport.cc.
References f, impl_, and edm::JobReport::OutputFile::numEventsWritten.
|
inlineprotected |
Definition at line 434 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 453 of file JobReport.cc.
References f, edm::JobReport::InputFile::fileHasBeenClosed, impl_, CommonMethods::lock(), edm::Primary, and write_mutex.
Referenced by DQMRootSource::closeFile_().
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 393 of file JobReport.cc.
References edm::JobReport::InputFile::branchNames, validate_alignment_devdb10_cfg::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, 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 513 of file JobReport.cc.
References f, edm::JobReport::OutputFile::fileHasBeenClosed, and impl_.
Referenced by DQMRootOutputModule::finishEndFile().
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 467 of file JobReport.cc.
References edm::JobReport::OutputFile::branchHash, edm::JobReport::OutputFile::branchNames, validate_alignment_devdb10_cfg::catalog, edm::JobReport::OutputFile::catalog, edm::JobReport::OutputFile::contributingInputs, edm::JobReport::OutputFile::contributingInputsSecSource, dtTPAnalyzer_cfg::dataType, edm::JobReport::OutputFile::dataType, edm::JobReport::OutputFile::fileHasBeenClosed, edm::JobReport::OutputFile::guid, i, impl_, edm::JobReport::OutputFile::logicalFileName, edm::JobReport::OutputFile::moduleLabel, edm::JobReport::OutputFile::numEventsWritten, edm::JobReport::OutputFile::outputModuleClassName, edm::JobReport::OutputFile::physicalFileName, and alignCSCRings::r.
Referenced by DQMRootOutputModule::openFile().
void edm::JobReport::parentAfterFork | ( | std::string const & | jobReportFile | ) |
Definition at line 379 of file JobReport.cc.
void edm::JobReport::parentBeforeFork | ( | std::string const & | jobReportFile, |
unsigned int | numberOfChildren | ||
) |
Definition at line 361 of file JobReport.cc.
References i, impl_, and AlCaHLTBitMon_ParallelJobs::p.
void edm::JobReport::reportAnalysisFile | ( | std::string const & | fileName, |
std::map< std::string, std::string > const & | fileData | ||
) |
Definition at line 559 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, and write_mutex.
Referenced by TFileService::afterBeginJob(), DQMStoreStats::calcstats(), 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 447 of file JobReport.cc.
References dtTPAnalyzer_cfg::dataType, edm::JobReport::OutputFile::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 580 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, and write_mutex.
Referenced by edm::printCmsException(), and edm::printCmsExceptionWarning().
void edm::JobReport::reportFallbackAttempt | ( | std::string const & | pfn, |
std::string const & | lfn, | ||
std::string const & | err | ||
) |
Definition at line 613 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, TiXmlElement::SetAttribute(), 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 709 of file JobReport.cc.
void edm::JobReport::reportFastCopyingStatus | ( | JobReport::Token | fileToken, |
std::string const & | inputFileName, | ||
bool | fastCopying | ||
) |
Definition at line 533 of file JobReport.cc.
References f, edm::JobReport::OutputFile::fastCopyingInputs, and impl_.
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 544 of file JobReport.cc.
References impl_.
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 554 of file JobReport.cc.
References impl_.
Referenced by DQMRootSource::readRun_().
void edm::JobReport::reportLumiSection | ( | JobReport::Token | token, |
unsigned int | run, | ||
unsigned int | lumiSectId | ||
) |
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 539 of file JobReport.cc.
References impl_.
Referenced by 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 629 of file JobReport.cc.
References impl_, and visualization-live-secondInstance_cfg::msg.
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 644 of file JobReport.cc.
References impl_, and visualization-live-secondInstance_cfg::msg.
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 754 of file JobReport.cc.
References impl_, and visualization-live-secondInstance_cfg::msg.
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 733 of file JobReport.cc.
References impl_, and visualization-live-secondInstance_cfg::msg.
Referenced by TFileAdaptor::termination().
void edm::JobReport::reportRandomStateFile | ( | std::string const & | name | ) |
Report the name of the random engine persistency file
Definition at line 719 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, 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 694 of file JobReport.cc.
References 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 660 of file JobReport.cc.
References impl_, and TiXmlElement::SetAttribute().
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 549 of file JobReport.cc.
References impl_.
Referenced by DQMRootOutputModule::writeRun().
void edm::JobReport::reportSkippedEvent | ( | RunNumber_t | run, |
EventNumber_t | event | ||
) |
Definition at line 520 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, 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 597 of file JobReport.cc.
References impl_, CommonMethods::lock(), visualization-live-secondInstance_cfg::msg, TiXmlElement::SetAttribute(), and write_mutex.
|
private |
Definition at line 437 of file JobReport.h.
Referenced by childAfterFork(), dumpFiles(), eventReadFromFile(), eventWrittenToFile(), impl(), inputFileClosed(), inputFileOpened(), JobReport(), outputFileClosed(), outputFileOpened(), parentBeforeFork(), reportAnalysisFile(), reportDataType(), reportError(), reportFallbackAttempt(), reportFastClonedBranches(), reportFastCopyingStatus(), reportInputLumiSection(), reportInputRunNumber(), reportLumiSection(), reportMemoryInfo(), reportMessageInfo(), reportPerformanceForModule(), reportPerformanceSummary(), reportRandomStateFile(), reportReadBranch(), reportReadBranches(), reportRunNumber(), reportSkippedEvent(), reportSkippedFile(), and ~JobReport().
|
private |
Definition at line 438 of file JobReport.h.
Referenced by inputFileClosed(), reportAnalysisFile(), reportError(), reportFallbackAttempt(), reportRandomStateFile(), reportSkippedEvent(), and reportSkippedFile().