Framework Job Report
The Framework Job Report is a text file containing
information relevant to a job. It is generated when the tcl
command
jobReport filename
<name>
is issued before events are processed.
For the above command to work, an application's AppUserBuild.cc must
add the job report module to Framework:
#include
"FrameExtension/FweJobReportModule.hh"
...
add (new FweJobReportModule("JobReportModule", "Job
Report Summary") );
The job report file, specified by <name> in the above tcl command
syntax, consists of key and value pairs. The first space
separates the key from the value. Keys are hierarchical, start
with "Bbr" or "Usr" with the hierarchy delimited by double colons
("::"), and end with the value name following a period ("."). For
example, the beginning of any job report file contains information
similar to this:
Bbr::JobReport.startTime
20041019 18:32:06 UTC
Bbr::JobReport.startTimeGMTsec 1098210726
Bbr::JobReport.bfsite slac
Bbr::JobReport.host noma0460
Bbr::JobReport.pid 9508
The hierarchy of the keys can be better illustrated by the following
key/value pairs reported by the input module:
Bbr::KanEventInput.numberCollections
3
Bbr::KanEventInput::Collection001.name /store/PR/R14/AllEvents/0004/09/14.3.2/AllEvents_00040923_14.3.2V00%rejectEventId=7f:4fff7fff:2d268c/fc9a84d7:Y,7f:4fff7fff:2d268c/fe5e2b9b:V,7f:4fff7fff:2d268d/0aae9213:M
Bbr::KanEventInput::Collection001.totalCollectionEvents 66037
Bbr::KanEventInput::Collection001.skippedInputEvents 0
Bbr::KanEventInput::Collection001.filteredOutInputEvents 3
Bbr::KanEventInput::Collection001.processedInputEvents 100
Bbr::KanEventInput::Collection002.name /store/PR/R14/AllEvents/0004/09/14.3.2/AllEvents_00040925_14.3.2V00
Bbr::KanEventInput::Collection002.totalCollectionEvents 92828
Bbr::KanEventInput::Collection002.skippedInputEvents 0
Bbr::KanEventInput::Collection002.filteredOutInputEvents 0
Bbr::KanEventInput::Collection002.processedInputEvents 0
Bbr::KanEventInput::Collection003.name /store/PR/R14/AllEvents/0004/09/14.3.2/AllEvents_00040922_14.3.2V01
Bbr::KanEventInput::Collection003.totalCollectionEvents 106714
Bbr::KanEventInput::Collection003.skippedInputEvents 0
Bbr::KanEventInput::Collection003.filteredOutInputEvents 0
Bbr::KanEventInput::Collection003.processedInputEvents 0
Bbr::KanEventInput::Component001.name hdr
Bbr::KanEventInput::Component002.name tag
Bbr::KanEventInput::Component003.name aod
Bbr::KanEventInput::Component004.name cnd
There are a few syntax rules to the keys and values: only
characters [a-zA-Z0-9] are allowed, special
characters (\n,\t,etc) are not allowed, spaces
can be used in the values but not the keys. Also note that the upper level hierarchy needs to be
declared first; for
example, Bbr::KanEventInput::Collection001 was declared only after Bbr::KanEventInput.
Another example to illustrate the hierarchy of the keys are the
key/value pairs from the output module:
Bbr::KanEventOutput.numberStreams
1
Bbr::KanEventOutput::Stream001.name
Moose157104Linux24RH72_i386_gcc2953
Bbr::KanEventOutput::Stream001.isEnabled true
Bbr::KanEventOutput::Stream001.collection /afs/slac.stanford.edu/g/babar/work/d/desilva/Moose157104Linux24RH72_i386_gcc2953
Bbr::KanEventOutput::Stream001.OutputEvents 5
Bbr::KanEventOutput::Stream001.numberContainers 6
Bbr::KanEventOutput::Stream001::Container001.name hdr
Bbr::KanEventOutput::Stream001::Container001.cluster
HBCAT
Bbr::KanEventOutput::Stream001::Container002.name tag
Bbr::KanEventOutput::Stream001::Container002.cluster
HBCAT
Bbr::KanEventOutput::Stream001::Container003.name aod
Bbr::KanEventOutput::Stream001::Container003.cluster
HBCAT
Bbr::KanEventOutput::Stream001::Container004.name cnd
Bbr::KanEventOutput::Stream001::Container004.cluster
HBCAT
Bbr::KanEventOutput::Stream001::Container005.name esd
Bbr::KanEventOutput::Stream001::Container005.cluster E
Bbr::KanEventOutput::Stream001::Container006.name tru
Bbr::KanEventOutput::Stream001::Container006.cluster
HBCAT
Bbr::KanEventOutput::Stream001.numberPaths 1
Bbr::KanEventOutput::Stream001::Path001.name
AllEventsPath
Finally the job report file ends with key/value pairs similar to:
Bbr::ErrLog.numberSeverityTypes
7
Bbr::ErrLog::Debugging.numberMessages 15
Bbr::ErrLog::Trace.numberMessages 2208
Bbr::ErrLog::Routine.numberMessages 648
Bbr::ErrLog::Warning.numberMessages 18
Bbr::ErrLog::Error.numberMessages 20
Bbr::ErrLog::Severe.numberMessages 0
Bbr::ErrLog::Fatal.numberMessages
0
Bbr::JobReport.stopTimeGMTsec 1098219864
Bbr::JobReport.stopTime 20041019 21:04:24 UTC
Note that the stop time and the error message counts can be used to
check for
problems in the job. If the job did not end successfully,
the last two pairs above would be missing and the value corresponding
to Bbr::ErrLog::Fatal.numberMessages would be
non-zero.
The examples above have so far shown keys starting with "Bbr" which is
reserved for BaBar code in releases; however keys can also start with
"Usr". For users who want to use the job reporting facility, the
recipe is as follows:
#include
"FrameJobReport/FjrFwkJobReport.hh"
...
FjrFwkJobReport* theReport = FjrFwkJobReport::getFwkJobReport();
if ( theReport->isEnabled() ) {
theReport->report(FjrAbsJobReport::Usr, "hierarchy", "valueName",
"value");
}
The line
Usr::hierarchy.valueName
value
will be generated in the job report file as a result of
the above code snippet.
The job report file is readable and can be grep-ed. In addition,
a perl module is available to be used within scripts to parse or
search for keys. To use this, please see the documentation
associated with the module:
addpkg FrameJobReport
cd FrameJobReport
perldoc FjrJobReport.pm
Last modified 19-Oct-2004, Asoka De Silva