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

a wrapper around a generic algorithm for use within EventLoop More...

#include <IAlgorithmWrapper.h>

Inheritance diagram for EL::IAlgorithmWrapper:
Collaboration diagram for EL::IAlgorithmWrapper:

Public Member Functions

virtual ~IAlgorithmWrapper () noexcept=default
 standard (virtual) destructor More...
 
virtual std::string_view getName () const =0
 get the name of this algorithm More...
 
virtual bool hasName (const std::string &name) const =0
 whether this algorithm has the given name More...
 
virtual std::unique_ptr< IAlgorithmWrappermakeClone () const =0
 make a clone of this algorithm More...
 
virtual AlgorithmgetLegacyAlg ()
 get the legacy algorithm, if we wrap one More...
 
virtual StatusCode initialize (const AlgorithmWorkerData &workerData)=0
 call initialize on the algorithm More...
 
virtual StatusCode execute ()=0
 call execute on the algorithm More...
 
virtual StatusCode postExecute ()
 call postExecute on the algorithm More...
 
virtual StatusCode finalize ()=0
 call finalize on the algorithm More...
 
virtual ::StatusCode fileExecute ()=0
 call fileExecute on the algorithm More...
 
virtual ::StatusCode beginInputFile ()=0
 call beginInputFile on the algorithm More...
 
virtual ::StatusCode endInputFile ()=0
 call endInputFile on the algorithm More...
 

Detailed Description

a wrapper around a generic algorithm for use within EventLoop

Currently (11 Jan 21) we have two algorithm classes for use within EventLoop (Algorithm and AnaAlgorithm), and more algorithm classes (as well as other components like tools and services) are likely to come in the future. Those need to be handled by EventLoop in a uniform manner, and to allow that each algorithm should be wrapped in an object that implements this interface and translates from this interface to the interface of the algorithm.

This should generally be done as a wrapper (or otherwise as a private base class) to insulate the user from the existence of this interface and future changes to it. Objects of this type should generally have a dictionary and allow full root serialization (writing to files and reading back) before initialize is called.

\warn While users could develop their own algorithm class and wrap it in an object of this class, that is generally strongly discouraged. And anybody who does this regardless of this warning should not expect this interface to remain unchanged from one version of EventLoop to the next.

Definition at line 47 of file IAlgorithmWrapper.h.

Constructor & Destructor Documentation

◆ ~IAlgorithmWrapper()

virtual EL::IAlgorithmWrapper::~IAlgorithmWrapper ( )
virtualdefaultnoexcept

standard (virtual) destructor

Member Function Documentation

◆ beginInputFile()

virtual ::StatusCode EL::IAlgorithmWrapper::beginInputFile ( )
pure virtual

◆ endInputFile()

virtual ::StatusCode EL::IAlgorithmWrapper::endInputFile ( )
pure virtual

◆ execute()

virtual StatusCode EL::IAlgorithmWrapper::execute ( )
pure virtual

◆ fileExecute()

virtual ::StatusCode EL::IAlgorithmWrapper::fileExecute ( )
pure virtual

◆ finalize()

virtual StatusCode EL::IAlgorithmWrapper::finalize ( )
pure virtual

◆ getLegacyAlg()

virtual Algorithm* EL::IAlgorithmWrapper::getLegacyAlg ( )
inlinevirtual

get the legacy algorithm, if we wrap one

Reimplemented in EL::AlgorithmMemoryWrapper, EL::AlgorithmTimerWrapper, and EL::AlgorithmWrapper.

Definition at line 64 of file IAlgorithmWrapper.h.

64 {return nullptr;};

◆ getName()

virtual std::string_view EL::IAlgorithmWrapper::getName ( ) const
pure virtual

◆ hasName()

virtual bool EL::IAlgorithmWrapper::hasName ( const std::string &  name) const
pure virtual

◆ initialize()

virtual StatusCode EL::IAlgorithmWrapper::initialize ( const AlgorithmWorkerData workerData)
pure virtual

◆ makeClone()

virtual std::unique_ptr<IAlgorithmWrapper> EL::IAlgorithmWrapper::makeClone ( ) const
pure virtual

◆ postExecute()

virtual StatusCode EL::IAlgorithmWrapper::postExecute ( )
inlinevirtual

call postExecute on the algorithm

Reimplemented in EL::AlgorithmMemoryWrapper, EL::AlgorithmTimerWrapper, and EL::AlgorithmWrapper.

Definition at line 73 of file IAlgorithmWrapper.h.

73 {return StatusCode::SUCCESS;};

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