ATLAS Offline Software
Public Member Functions | List of all members
EL::IWorker Class Referenceabstract

the interface for algorithms to access IWorker More...

#include <IWorker.h>

Inheritance diagram for EL::IWorker:
Collaboration diagram for EL::IWorker:

Public Member Functions

virtual void addOutputList (const std::string &name, TObject *output_swallow)=0
 effects: add a given object to the output. More...
 
virtual TFile * getOutputFile (const std::string &label) const =0
 effects: get the output file that goes into the dataset with the given label. More...
 
virtual TFile * getOutputFileNull (const std::string &label) const =0
 effects: get the output file that goes into the dataset with the given label. More...
 
virtual const SH::MetaObjectmetaData () const =0
 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 More...
 
virtual TTree * tree () const =0
 description: the tree we are running on guarantee: no-fail More...
 
virtual Long64_t treeEntry () const =0
 description: the entry in the tree we are reading guarantee: no-fail More...
 
virtual TFile * inputFile () const =0
 description: the file we are reading the current tree from guarantee: no-fail More...
 
virtual std::string inputFileName () const =0
 the name of the file we are reading the current tree from, without the path component More...
 
virtual TTree * triggerConfig () const =0
 description: the trigger config tree from the input file, or NULL if we did not find it guarantee: strong failures: i/o errors More...
 
virtual xAOD::TEventxaodEvent () const =0
 description: the xAOD event and store guarantee: strong failures: out of memory I failures: TEventSvc not configured postcondition: result != 0 More...
 
virtual xAOD::TStorexaodStore () const =0
 
virtual EL::AlgorithmgetAlg (const std::string &name) const =0
 effects: returns the algorithms with the given name or NULL if there is none guarantee: strong failures: out of memory II More...
 
virtual void skipEvent ()=0
 effects: skip the current event, i.e. More...
 
virtual bool filterPassed () const noexcept=0
 whether the current algorithm passed its filter criterion for the current event More...
 
virtual void setFilterPassed (bool val_filterPassed) noexcept=0
 set the value of filterPassed More...
 
virtual void addOutput (TObject *output_swallow)=0
 effects: add an object to the output. More...
 
virtual TObject * getOutputHist (const std::string &name) const =0
 get the output histogram with the given name More...
 
virtual ::StatusCode addTree (const TTree &tree, const std::string &stream)=0
 Add a tree to the output, into an output stream/file. More...
 
virtual TTree * getOutputTree (const std::string &name, const std::string &stream) const =0
 Get the pointer to an output tree with a given name/stream. More...
 

Detailed Description

the interface for algorithms to access IWorker

Up to now (16 Jan 19) algorithms could directly access the worker object. However, there is no good reason for algorithms to access the worker directly, so I now put an interface between the two.

Definition at line 38 of file IWorker.h.

Member Function Documentation

◆ addOutput()

virtual void EL::IHistogramWorker::addOutput ( TObject *  output_swallow)
pure virtualinherited

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.

Implemented in EL::Worker.

◆ addOutputList()

virtual void EL::IWorker::addOutputList ( const std::string &  name,
TObject *  output_swallow 
)
pure virtual

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.

Implemented in EL::Worker.

◆ addTree()

virtual ::StatusCode EL::ITreeWorker::addTree ( const TTree &  tree,
const std::string &  stream 
)
pure virtualinherited

Add a tree to the output, into an output stream/file.

Parameters
treeThe tree to put into the output stream/file
streamThe name of the stream/file to put the tree into.

Implemented in EL::Worker.

◆ filterPassed()

virtual bool EL::IFilterWorker::filterPassed ( ) const
pure virtualnoexceptinherited

whether the current algorithm passed its filter criterion for the current event

Guarantee
no-fail

Implemented in EL::Worker.

◆ getAlg()

virtual EL::Algorithm* EL::IWorker::getAlg ( const std::string &  name) const
pure virtual

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

Implemented in EL::Worker.

◆ getOutputFile()

virtual TFile* EL::IWorker::getOutputFile ( const std::string &  label) const
pure virtual

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.

Implemented in EL::Worker.

◆ getOutputFileNull()

virtual TFile* EL::IWorker::getOutputFileNull ( const std::string &  label) const
pure virtual

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.

Implemented in EL::Worker.

◆ getOutputHist()

virtual TObject* EL::IHistogramWorker::getOutputHist ( const std::string &  name) const
pure virtualinherited

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

Implemented in EL::Worker.

◆ getOutputTree()

virtual TTree* EL::ITreeWorker::getOutputTree ( const std::string &  name,
const std::string &  stream 
) const
pure virtualinherited

Get the pointer to an output tree with a given name/stream.

Parameters
nameThe name of the tree to find
streamThe stream/file to find the tree in
Returns
A pointer to the tree if successful, or nullptr if not

Implemented in EL::Worker.

◆ inputFile()

virtual TFile* EL::IWorker::inputFile ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ inputFileName()

virtual std::string EL::IWorker::inputFileName ( ) const
pure virtual

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

Guarantee
no-fail

Implemented in EL::Worker.

◆ metaData()

virtual const SH::MetaObject* EL::IWorker::metaData ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ setFilterPassed()

virtual void EL::IFilterWorker::setFilterPassed ( bool  val_filterPassed)
pure virtualnoexceptinherited

set the value of filterPassed

Guarantee
no-fail

Implemented in EL::Worker.

◆ skipEvent()

virtual void EL::IWorker::skipEvent ( )
pure virtual

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

Implemented in EL::Worker.

◆ tree()

virtual TTree* EL::IWorker::tree ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ treeEntry()

virtual Long64_t EL::IWorker::treeEntry ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ triggerConfig()

virtual TTree* EL::IWorker::triggerConfig ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ xaodEvent()

virtual xAOD::TEvent* EL::IWorker::xaodEvent ( ) const
pure virtual

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

Implemented in EL::Worker.

◆ xaodStore()

virtual xAOD::TStore* EL::IWorker::xaodStore ( ) const
pure virtual

Implemented in EL::Worker.


The documentation for this class was generated from the following file: