ATLAS Offline Software
Loading...
Searching...
No Matches
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
18class EventContext;
19
20namespace EL
21{
22 class Algorithm;
23
48
50 {
51 public:
52
54 virtual ~IAlgorithmWrapper () noexcept = default;
55
57 virtual std::string_view getName () const = 0;
58
60 virtual bool hasName (const std::string& name) const = 0;
61
64
66 virtual Algorithm *getLegacyAlg () {return nullptr;};
67
69 virtual StatusCode initialize (const AlgorithmWorkerData& workerData) = 0;
70
72 virtual StatusCode execute (const EventContext& ctx) = 0;
73
75 virtual StatusCode postExecute () {return StatusCode::SUCCESS;};
76
78 virtual StatusCode finalize () = 0;
79
81 virtual ::StatusCode fileExecute () = 0;
82
84 virtual ::StatusCode beginInputFile () = 0;
85
87 virtual ::StatusCode endInputFile () = 0;
88 };
89}
90
91#endif
a wrapper around a generic algorithm for use within EventLoop
virtual bool hasName(const std::string &name) const =0
whether this algorithm has the given name
virtual::StatusCode beginInputFile()=0
call beginInputFile on the algorithm
virtual Algorithm * getLegacyAlg()
get the legacy algorithm, if we wrap one
virtual std::string_view getName() const =0
get the name of this algorithm
virtual StatusCode execute(const EventContext &ctx)=0
call execute on the algorithm
virtual StatusCode initialize(const AlgorithmWorkerData &workerData)=0
call initialize on the algorithm
virtual StatusCode postExecute()
call postExecute on the algorithm
virtual::StatusCode fileExecute()=0
call fileExecute on the algorithm
virtual::StatusCode endInputFile()=0
call endInputFile on the algorithm
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const =0
make a clone of this algorithm
virtual StatusCode finalize()=0
call finalize on the algorithm
virtual ~IAlgorithmWrapper() noexcept=default
standard (virtual) destructor
STL class.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
STL namespace.
all the external components an algorithm needs before initialization (in EventLoop)