40 os <<
"\n<InputFile>";
42 os <<
"\n<InputType>" << f.
inputType <<
"</InputType>";
44 <<
"</InputSourceClass>";
53 os <<
"\n<OutputModuleClass>"
55 <<
"</OutputModuleClass>";
56 os <<
"\n<TotalEvents>"
58 <<
"</TotalEvents>\n";
62 os <<
"\n<BranchHash>"
77 typedef std::set<unsigned int>::iterator iterator;
79 os <<
" <LumiSection ID=\"" << *il <<
"\"/>\n";
115 <<
"Access reported for input file with token "
117 <<
" but no matching input file is found\n";
122 <<
"Access reported for input file with token "
124 <<
" after this file has been closed.\n"
125 <<
"File record follows:\n"
134 if (t >= outputFiles_.size()) {
136 <<
"Access reported for output file with token "
138 <<
" but no matching output file is found\n";
140 if (outputFiles_[t].fileHasBeenClosed) {
142 <<
"Access reported for output file with token "
144 <<
" after this file has been closed.\n"
145 <<
"File record follows:\n"
149 return outputFiles_[
t];
159 typedef std::vector<JobReport::OutputFile>::iterator iterator;
160 for (iterator outFile = outputFiles_.begin(), outFileEnd = outputFiles_.end(); outFile != outFileEnd; ++outFile) {
161 outFile->contributingInputs.push_back(t);
171 result.reserve(inputFiles_.size());
172 for (
unsigned int i = 0;
i < inputFiles_.size(); ++
i) {
173 if (inputFiles_[
i].fileHasBeenClosed ==
false) {
185 result.reserve(outputFiles_.size());
186 for (
unsigned int i = 0;
i < outputFiles_.size(); ++
i) {
187 if (outputFiles_[
i].fileHasBeenClosed ==
false) {
202 typedef std::map<JobReport::RunNumber, JobReport::RunReport>::const_iterator const_iterator;
203 for (const_iterator iRun = f.runReports.begin(), iRunEnd = f.runReports.end(); iRun != iRunEnd; ++iRun) {
204 *ost_ << iRun->second;
206 *ost_ <<
"\n</Runs>\n";
207 *ost_ <<
"</InputFile>\n";
233 typedef std::map<JobReport::RunNumber, JobReport::RunReport>::const_iterator const_iterator;
234 for (const_iterator iRun = f.runReports.begin(), iRunEnd = f.runReports.end(); iRun != iRunEnd; ++iRun) {
235 *ost_ << iRun->second;
237 *ost_ <<
"\n</Runs>\n";
239 *ost_ <<
"\n<Inputs>";
240 for (std::vector<JobReport::Token>::const_iterator
241 iInput = f.contributingInputs.begin(),
242 iInputEnd = f.contributingInputs.end();
243 iInput != iInputEnd; ++iInput) {
245 *ost_ <<
"\n<Input>";
249 *ost_ <<
"\n</Input>";
251 *ost_ <<
"\n</Inputs>";
252 *ost_ <<
"\n</File>\n";
261 for (std::vector<JobReport::InputFile>::iterator ipos = inputFiles_.begin(), iposEnd = inputFiles_.end();
262 ipos != iposEnd; ++ipos) {
263 if (!(ipos->fileHasBeenClosed)) {
264 writeInputFile(*ipos);
267 for (std::vector<JobReport::OutputFile>::iterator opos = outputFiles_.begin(), oposEnd = outputFiles_.end();
268 opos != oposEnd; ++opos) {
269 if (!(opos->fileHasBeenClosed)) {
270 writeOutputFile(*opos);
276 std::string
const&
value) {
283 *ost_ <<
"\n<GeneratorInfo>\n";
284 for (std::map<std::string, std::string>::iterator
pos = generatorInfo_.begin(),
285 posEnd = generatorInfo_.end();
287 std::ostringstream
msg;
288 msg <<
"\n<Data Name=\"" <<
pos->first
289 <<
"\" Value=\"" <<
pos->second <<
"\"/>";
292 *ost_ <<
"</GeneratorInfo>\n";
297 std::vector<Token> openFiles;
298 openOutputFiles(openFiles);
299 for (std::vector<Token>::iterator iToken = openFiles.begin(), iTokenEnd = openFiles.end(); iToken != iTokenEnd; ++iToken) {
305 if (theFile.
runReports.count(runNumber) == 0) {
309 std::make_pair(runNumber, newReport)
317 std::vector<Token> openFiles;
318 openInputFiles(openFiles);
319 for (std::vector<Token>::iterator iToken = openFiles.begin(), iTokenEnd = openFiles.end(); iToken != iTokenEnd; ++iToken) {
325 if (theFile.
runReports.count(runNumber) == 0) {
328 theFile.
runReports.insert(std::make_pair(runNumber, newReport));
335 std::vector<Token> openFiles;
336 openOutputFiles(openFiles);
337 for (std::vector<Token>::iterator iToken = openFiles.begin(), iTokenEnd = openFiles.end(); iToken != iTokenEnd; ++iToken) {
346 if (theFile.
runReports.count(runNumber) == 0) {
349 theFile.
runReports.insert(std::make_pair(runNumber, newReport));
355 std::map<JobReport::RunNumber, JobReport::RunReport>::iterator finder;
361 (finder->second).lumiSections.insert(lumiSect);
366 std::vector<Token> openFiles;
367 openInputFiles(openFiles);
368 for (std::vector<Token>::iterator iToken = openFiles.begin(), iTokenEnd = openFiles.end(); iToken != iTokenEnd; ++iToken) {
377 if (theFile.
runReports.count(runNumber) == 0) {
380 theFile.
runReports.insert(std::make_pair(runNumber, newReport));
386 std::map<JobReport::RunNumber, JobReport::RunReport>::iterator finder;
392 (finder->second).lumiSections.insert(lumiSect);
397 impl_->writeGeneratorInfo();
400 *(
impl_->ost_) <<
"</FrameworkJobReport>\n" << std::flush;
410 *(
impl_->ost_) <<
"<FrameworkJobReport>\n";
416 toFileName(std::string
const& jobReportFile,
unsigned int childIndex,
unsigned int numberOfChildren, std::ostringstream& ofilename) {
417 unsigned int numberOfDigitsInIndex = 0U;
418 while (numberOfChildren != 0) {
419 ++numberOfDigitsInIndex;
420 numberOfChildren /= 10;
422 if (numberOfDigitsInIndex == 0) {
423 numberOfDigitsInIndex = 3;
426 if (offset == std::string::npos) {
427 ofilename << jobReportFile;
428 ofilename <<
'_' << std::setw(numberOfDigitsInIndex) << std::setfill(
'0') << childIndex;
430 ofilename << jobReportFile.substr(0, offset);
431 ofilename <<
'_' << std::setw(numberOfDigitsInIndex) << std::setfill(
'0') << childIndex;
432 ofilename << jobReportFile.substr(offset);
440 *(
impl_->ost_) <<
"<ChildProcessFiles>\n";
441 for (
unsigned int i = 0;
i < numberOfChildren; ++
i) {
442 std::ostringstream ofilename;
443 toFileName(jobReportFile,
i, numberOfChildren, ofilename);
444 *(
impl_->ost_) <<
" <ChildProcessFile>" << ofilename.str() <<
"</ChildProcessFile>\n";
446 *(
impl_->ost_) <<
"</ChildProcessFiles>\n";
447 *(
impl_->ost_) <<
"</FrameworkJobReport>\n";
448 std::ofstream*
p =
dynamic_cast<std::ofstream *
>(
impl_->ost_);
461 std::ofstream*
p =
dynamic_cast<std::ofstream *
>(
impl_->ost_);
463 std::ostringstream ofilename;
464 toFileName(jobReportFile, childIndex, numberOfChildren, ofilename);
465 p->open(ofilename.str().c_str());
466 *p <<
"<FrameworkJobReport>\n";
471 std::string
const& logicalFileName,
473 std::string
const& inputType,
474 std::string
const& inputSourceClassName,
476 std::string
const& guid,
477 std::vector<std::string>
const& branchNames) {
499 impl_->insertInputForOutputs(newToken);
524 impl_->writeInputFile(f);
529 std::string
const& logicalFileName,
531 std::string
const& outputModuleClassName,
533 std::string
const& guid,
535 std::string
const& branchHash,
536 std::vector<std::string>
const& branchNames) {
556 return impl_->outputFiles_.size()-1;
574 impl_->writeOutputFile(f);
601 std::vector<Token>
const& inputTokens) {
612 msg <<
"<SkippedEvent Run=\"" << run <<
"\"";
613 msg <<
" Event=\"" <<
event <<
"\" />\n";
621 impl_->associateLumiSection(run, lumiSectId);
626 impl_->associateInputLumiSection(run, lumiSectId);
631 impl_->associateRun(run);
635 impl_->associateInputRun(run);
640 std::string
const& longDesc) {
643 msg <<
"<FrameworkError ExitStatus=\"1\" Type=\"" << shortDesc <<
"\" >\n";
644 msg <<
"<![CDATA[\n" << longDesc <<
"\n]]>\n";
645 msg <<
"</FrameworkError>\n";
656 msg <<
"<AnalysisFile>\n"
657 <<
" <FileName>" <<
TiXmlText(fileName) <<
"</FileName>\n";
659 typedef std::map<std::string, std::string>::const_iterator const_iterator;
660 for (const_iterator
pos = fileData.begin(), posEnd = fileData.end();
pos != posEnd; ++
pos) {
661 msg <<
" <" <<
pos->first
662 <<
" Value=\"" <<
pos->second <<
"\" />"
665 msg <<
"</AnalysisFile>\n";
673 std::string
const& longDesc,
674 int const& exitCode) {
678 msg <<
"<FrameworkError ExitStatus=\""<< exitCode
679 <<
"\" Type=\"" << shortDesc <<
"\" >\n";
680 msg <<
"<![CDATA[\n" << longDesc <<
"\n]]>\n";
681 msg <<
"</FrameworkError>\n";
689 std::string
const& lfn) {
695 msg << skipped <<
"\n";
705 msg <<
"<MemoryService>\n";
707 typedef std::vector<std::string>::const_iterator const_iterator;
708 for (const_iterator
pos = memoryData.begin(), posEnd = memoryData.end();
pos != posEnd; ++
pos) {
711 msg <<
"</MemoryService>\n";
720 msg <<
"<MessageSummary>\n";
721 typedef std::map<std::string, double>::const_iterator const_iterator;
722 for (const_iterator
pos = messageData.begin(), posEnd = messageData.end();
pos != posEnd; ++
pos) {
723 msg <<
" <" <<
pos->first
724 <<
" Value=\"" <<
pos->second <<
"\" />"
727 msg <<
"</MessageSummary>\n";
734 impl_->addGeneratorInfo(name, value);
740 msg <<
"<RandomServiceStateFile>\n"
742 <<
"</RandomServiceStateFile>\n";
762 std::map<std::string, std::string>
const& metrics) {
765 msg <<
"<PerformanceReport>\n"
766 <<
" <PerformanceSummary Metric=\"" << metricClass <<
"\">\n";
768 typedef std::map<std::string, std::string>::const_iterator const_iterator;
769 for(const_iterator iter = metrics.begin(), iterEnd = metrics.end(); iter != iterEnd; ++iter) {
770 msg <<
" <Metric Name=\"" << iter->first <<
"\" "
771 <<
"Value=\"" << iter->second <<
"\"/>\n";
774 msg <<
" </PerformanceSummary>\n"
775 <<
"</PerformanceReport>\n";
783 std::string
const& moduleName,
784 std::map<std::string, std::string>
const& metrics) {
787 msg <<
"<PerformanceReport>\n"
788 <<
" <PerformanceModule Metric=\"" << metricClass <<
"\" "
789 <<
" Module=\"" << moduleName <<
"\" >\n";
791 typedef std::map<std::string, std::string>::const_iterator const_iterator;
792 for(const_iterator iter = metrics.begin(), iterEnd = metrics.end(); iter != iterEnd; ++iter) {
793 msg <<
" <Metric Name=\"" << iter->first <<
"\" "
794 <<
"Value=\"" << iter->second <<
"\"/>\n";
797 msg <<
" </PerformanceModule>\n"
798 <<
"</PerformanceReport>\n";
806 std::ostringstream
msg;
808 typedef std::vector<JobReport::OutputFile>::iterator iterator;
810 for (iterator
f =
impl_->outputFiles_.begin(), fEnd =
impl_->outputFiles_.end();
f != fEnd; ++
f) {
815 msg <<
"\n<LumiSections>";
824 typedef std::vector<JobReport::Token>::iterator iterator;
825 for (iterator iInput = f->contributingInputs.begin(),
826 iInputEnd = f->contributingInputs.end();
827 iInput != iInputEnd; ++iInput) {
835 msg <<
"\n</Inputs>";
void openInputFiles(std::vector< Token > &tokens)
void associateRun(unsigned int runNumber)
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 eventWrittenToFile(Token fileToken, unsigned int run, unsigned int event)
std::string outputModuleClassName
std::string physicalFileName
void reportFastCopyingStatus(Token t, std::string const &inputFileName, bool fastCopying)
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)
void overrideEventsWritten(Token fileToken, int const eventsWritten)
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
void reportRandomStateFile(std::string const &name)
std::map< std::string, bool > fastCopyingInputs
std::string logicalFileName
void reportDataType(Token fileToken, std::string const &dataType)
S & print(S &os, JobReport::InputFile const &f)
void outputFileClosed(Token fileToken)
std::vector< InputFile > inputFiles_
std::vector< Token > contributingInputs
void writeInputFile(InputFile const &f)
void inputFileClosed(Token fileToken)
void SetAttribute(const char *name, const char *_value)
std::map< RunNumber, RunReport > runReports
std::set< unsigned int > lumiSections
void parentAfterFork(std::string const &jobReportFile)
void reportSkippedEvent(unsigned int run, unsigned int event)
void openOutputFiles(std::vector< Token > &tokens)
unsigned int offset(bool)
void reportPSetHash(std::string const &hashValue)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void eventReadFromFile(Token fileToken, unsigned int run, unsigned int event)
void reportInputRunNumber(unsigned int run)
void associateInputRun(unsigned int runNumber)
InputFile & getInputFileForToken(Token t)
S & formatFile(T const &f, S &os)
void childAfterFork(std::string const &jobReportFile, unsigned int childIndex, unsigned int numberOfChildren)
New output file for child.
boost::scoped_ptr< JobReportImpl > impl_
void reportGeneratorInfo(std::string const &name, std::string const &value)
void reportLumiSection(unsigned int run, unsigned int lumiSectId)
Value const & findOrDefault(std::map< Key, Value > const &m, Key const &k, Value const &defaultValue)
void reportMemoryInfo(std::vector< std::string > const &memoryData)
std::string dumpFiles(void)
debug/test util
void reportError(std::string const &shortDesc, std::string const &longDesc)
void reportInputLumiSection(unsigned int run, unsigned int lumiSectId)
void writeOutputFile(OutputFile const &f)
void overrideEventsRead(Token fileToken, int const eventsRead)
void reportPerformanceSummary(std::string const &metricClass, std::map< std::string, std::string > const &metrics)
void insertInputForOutputs(Token t)
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
void parentBeforeFork(std::string const &jobReportFile, unsigned int numberOfChildren)
void associateInputLumiSection(unsigned int runNumber, unsigned int lumiSection)
void writeGeneratorInfo(void)
void addGeneratorInfo(std::string const &name, std::string const &value)
void reportPerformanceForModule(std::string const &metricClass, std::string const &moduleName, std::map< std::string, std::string > const &metrics)
void reportMessageInfo(std::map< std::string, double > const &messageData)
void overrideContributingInputs(Token outputToken, std::vector< Token > const &inputTokens)
void associateLumiSection(unsigned int runNumber, unsigned int lumiSection)
OutputFile & getOutputFileForToken(Token t)
void reportRunNumber(unsigned int run)
void reportSkippedFile(std::string const &pfn, std::string const &lfn)
const std::string * moduleLabel() const