EL::Worker Class Reference

Inheritance diagram for EL::Worker:
EL::BackgroundWorker EL::BatchWorker EL::DirectWorker EL::GridWorker EL::ProofWorker

List of all members.

Public Member Functions

void testInvariant () const
virtual ~Worker ()
void addOutput (TObject *output_swallow)
void addOutputList (const std::string &name, TObject *output_swallow)
TH1 * getOutputHist (const std::string &name) const
 get the output histogram with the given name
TFile * getOutputFile (const std::string &label) const
TFile * getOutputFileNull (const std::string &label) const
const SH::MetaObjectmetaData () const
TTree * tree () const
Long64_t treeEntry () const
TFile * inputFile () const
std::string inputFileName () const
 the name of the file we are reading the current tree from, without the path component
TTree * triggerConfig () const
xAOD::TEventxaodEvent () const
xAOD::TStorexaodStore () const
EL::AlgorithmgetAlg (const std::string &name) const
void skipEvent ()

Protected Member Functions

 Worker (const SH::MetaObject *val_metaData, TList *output)
void addOutputFile (const std::string &label, TFile *file_swallow)
void addOutputWriter (const std::string &label, SH::DiskWriter *writer_swallow)
void addAlg (EL::Algorithm *alg_swallow)
void algsChangeInput ()
void algsExecute ()
void algsEndOfFile ()
void algsFinalize ()
void treeEntry (Long64_t val_treeEntry)
 description: s.a.
void setInputFile (TFile *val_inputFile)
 set the value of inputFile
void setTreeProofOnly (TTree *val_tree)
 set the input tree (for PROOF driver only)
Long64_t inputFileNumEntries () const
 the number of events in the input file

Constructor & Destructor Documentation

EL::Worker::~Worker (  )  [virtual]

effects: standard destructor guarantee: no-fail rationale: virtual destructor for base class

EL::Worker::Worker ( const SH::MetaObject val_metaData,
TList *  output 
) [protected]

effects: standard constructor guarantee: strong failures: low level errors I requires: val_metaData != 0 requires: output != 0 warning: you have to keep the meta-data object around until the worker object is destroyed.


Member Function Documentation

void EL::Worker::addAlg ( EL::Algorithm alg_swallow  )  [protected]

effects: add another algorithm guarantee: strong failures: out of memory II requires: alg_swallow != 0

void EL::Worker::addOutput ( TObject *  output_swallow  ) 

effects: add an object to the output. the worker takes over ownership of the object, but the caller may maintain a reference to it guarantee: basic, argument is always swallowed failures: out of memory I requires: output_swallow != 0 warning: so far I placed no requirements on the output objects. I may do that at a later stage though, possibly breaking existing code.

void EL::Worker::addOutputFile ( const std::string &  label,
TFile *  file_swallow 
) [protected]

effects: add another output file guarantee: strong failures: low level errors II failures: label already used requires: file_swallow != 0

void EL::Worker::addOutputList ( const std::string &  name,
TObject *  output_swallow 
)

effects: add a given object to the output. instead of trying to merge the outputs from multiple jobs the output file will contain a TList of the given name with the objects from all the output. guarantee: basic, argument is always swallowed failures: out of memory II requires: output_swallow != 0 rationale: This was primarily build to allow the GRL output to be collected from EventLoop jobs, but it can be used for any kind of output that can not or should not be merged.

void EL::Worker::algsChangeInput (  )  [protected]

effects: tell all algorithms that we started a new file, so they should either initialize themselves, or update file specific pointers guarantee: basic failures: algorithm dependent requires: file pointers are set properly postcondition: algorithms are initialized

void EL::Worker::algsEndOfFile (  )  [protected]

effects: do any actions that should happen at the end of a file guarantee: basic failures: configuration dependent requires: file pointers are set properly requires: algorithms are initialized rationale: this doesn't actually talk to the algorithms, but is still named in the same manner to indiciate that it is to be used in the same way as the ones notifying the algorithms. rationale: calling this function is optional, since not all submission modes can support (especially not PROOF)

void EL::Worker::algsExecute (  )  [protected]

effects: tell all algorithms that they should process the next event guarantee: basic failures: algorithm dependent requires: file pointers are set properly requires: algorithms are initialized

rationale: this will make sure that the post-processing runs for all algorithms for which the regular processing was run

void EL::Worker::algsFinalize (  )  [protected]

effects: tell all algorithms that they should finish processing guarantee: basic failures: algorithm dependent failures: worker in wrong state requires: file pointers are set properly

Algorithm * EL::Worker::getAlg ( const std::string &  name  )  const

effects: returns the algorithms with the given name or NULL if there is none guarantee: strong failures: out of memory II

TFile * EL::Worker::getOutputFile ( const std::string &  label  )  const

effects: get the output file that goes into the dataset with the given label. this dataset has to be registered before the job is submitted. typically that happens in the doSetupJob method. guarantee: strong failures: no dataset with the given label postcondition: result != 0 note: the default value for the argument corresponds to the default label value in the OutputInfo class.

TFile * EL::Worker::getOutputFileNull ( const std::string &  label  )  const

effects: get the output file that goes into the dataset with the given label. this dataset has to be registered before the job is submitted. typically that happens in the doSetupJob method. guarantee: strong failures: internal errors note: the default value for the argument corresponds to the default label value in the OutputInfo class. rationale: this method was added to support optional output files, i.e.: the algorithm leaves it to the user whether or not the output file gets configured. then the algorithm just checks whether the output file is there. if so it fills it, otherwise it ignores it.

TH1 * EL::Worker::getOutputHist ( const std::string &  name  )  const

get the output histogram with the given name

This is mostly meant, so that I can emulate the Athena histogram mechanism.

Guarantee
strong
Failures
object not found
Postcondition:
result != 0
TFile * EL::Worker::inputFile (  )  const

description: the file we are reading the current tree from guarantee: no-fail

std::string EL::Worker::inputFileName (  )  const

the name of the file we are reading the current tree from, without the path component

Guarantee
no-fail
Long64_t EL::Worker::inputFileNumEntries (  )  const [protected]

the number of events in the input file

Guarantee
no-fail
Precondition:
inputFile() != 0
const SH::MetaObject * EL::Worker::metaData (  )  const

description: the sample meta-data we are working on guarantee: no-fail invariant: metaData != 0 rationale: this can be used for accessing sample meta-data

void EL::Worker::setInputFile ( TFile *  val_inputFile  )  [protected]

set the value of inputFile

as side effects it also retrieves the input tree from the file, and sets the cache parameters if requested by the user.

Guarantee
strong
Failures
errors initializing input tree
void EL::Worker::setTreeProofOnly ( TTree *  val_tree  )  [protected]

set the input tree (for PROOF driver only)

Normal workers should set the input file/tree via setInputFile, which handles empty files gracefully. However since PROOF natively works on the level of trees and filters out empty files (plus sets the cache parameters internally), this special routine is provided for it.

Guarantee
no-fail
void EL::Worker::skipEvent (  ) 

effects: skip the current event, i.e. skip the rest of the algorithms for this event guarantee: no-fail rationale: if you have an analysis strategy in which you divide work into multiple algorithms you may want to have dedicated algorithms for event selection that then skip later algorithms that fill histograms

void EL::Worker::testInvariant (  )  const

effects: test the invariant of this object guarantee: no-fail

Reimplemented in EL::BackgroundWorker, EL::BatchWorker, EL::DirectWorker, EL::ProofWorker, and EL::GridWorker.

TTree * EL::Worker::tree (  )  const

description: the tree we are running on guarantee: no-fail

Long64_t EL::Worker::treeEntry (  )  const

description: the entry in the tree we are reading guarantee: no-fail

TTree * EL::Worker::triggerConfig (  )  const

description: the trigger config tree from the input file, or NULL if we did not find it guarantee: strong failures: i/o errors

xAOD::TEvent * EL::Worker::xaodEvent (  )  const

description: the xAOD event and store guarantee: strong failures: out of memory I failures: TEventSvc not configured postcondition: result != 0


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1