ATLAS Offline Software
IAlgorithmWrapper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef ANA_ALGORITHM__I_ALGORITHM_WRAPPER_H
10 #define ANA_ALGORITHM__I_ALGORITHM_WRAPPER_H
11 
12 #include <AnaAlgorithm/Global.h>
13 
15 #include <memory>
16 #include <string_view>
17 
18 namespace EL
19 {
20  class Algorithm;
21 
46 
48  {
49  public:
50 
52  virtual ~IAlgorithmWrapper () noexcept = default;
53 
55  virtual std::string_view getName () const = 0;
56 
58  virtual bool hasName (const std::string& name) const = 0;
59 
61  virtual std::unique_ptr<IAlgorithmWrapper> makeClone() const = 0;
62 
64  virtual Algorithm *getLegacyAlg () {return nullptr;};
65 
67  virtual StatusCode initialize (const AlgorithmWorkerData& workerData) = 0;
68 
70  virtual StatusCode execute () = 0;
71 
73  virtual StatusCode postExecute () {return StatusCode::SUCCESS;};
74 
76  virtual StatusCode finalize () = 0;
77 
80 
83 
86  };
87 }
88 
89 #endif
EL::IAlgorithmWrapper::fileExecute
virtual ::StatusCode fileExecute()=0
call fileExecute on the algorithm
EL::IAlgorithmWrapper::makeClone
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const =0
make a clone of this algorithm
EL::IAlgorithmWrapper::finalize
virtual StatusCode finalize()=0
call finalize on the algorithm
EL::IAlgorithmWrapper::~IAlgorithmWrapper
virtual ~IAlgorithmWrapper() noexcept=default
standard (virtual) destructor
EL::IAlgorithmWrapper::getLegacyAlg
virtual Algorithm * getLegacyAlg()
get the legacy algorithm, if we wrap one
Definition: IAlgorithmWrapper.h:64
EL::IAlgorithmWrapper::execute
virtual StatusCode execute()=0
call execute on the algorithm
python.FakeAthena.Algorithm
def Algorithm(name)
Definition: FakeAthena.py:41
EL::IAlgorithmWrapper::hasName
virtual bool hasName(const std::string &name) const =0
whether this algorithm has the given name
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
EL::IAlgorithmWrapper::endInputFile
virtual ::StatusCode endInputFile()=0
call endInputFile on the algorithm
EL::Algorithm
Definition: Algorithm.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::IAlgorithmWrapper::beginInputFile
virtual ::StatusCode beginInputFile()=0
call beginInputFile on the algorithm
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::IAlgorithmWrapper::postExecute
virtual StatusCode postExecute()
call postExecute on the algorithm
Definition: IAlgorithmWrapper.h:73
StatusCode.h
Global.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EL::AlgorithmWorkerData
all the external components an algorithm needs before initialization (in EventLoop)
Definition: AlgorithmWorkerData.h:34
EL::IAlgorithmWrapper::initialize
virtual StatusCode initialize(const AlgorithmWorkerData &workerData)=0
call initialize on the algorithm
EL::IAlgorithmWrapper
a wrapper around a generic algorithm for use within EventLoop
Definition: IAlgorithmWrapper.h:48
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
EL::IAlgorithmWrapper::getName
virtual std::string_view getName() const =0
get the name of this algorithm