Loading [MathJax]/jax/output/HTML-CSS/config.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IAlgorithm.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IALGORITHM_H
2 #define GAUDIKERNEL_IALGORITHM_H
3 
4 // Include files
7 #include <string>
8 
9 class IAlgTool;
10 class AlgResourcePool;
11 class EventContext;
12 
13 namespace Gaudi {
14  class StringKey;
15 }
16 
27 class GAUDI_API IAlgorithm : virtual public extend_interfaces<INamedInterface,
28  IStateful> {
29 public:
30 
32 
35 
38  virtual const std::string& version() const = 0;
39 
42  virtual const std::string& type() const = 0;
43  virtual void setType(const std::string& ) = 0;
44 
47  virtual const Gaudi::StringKey& nameKey() const = 0;
48 
51  virtual unsigned int index() const = 0;
52 
55  virtual bool isClonable() const = 0;
56 
60  virtual unsigned int cardinality() const = 0;
61 
64  virtual const std::vector<std::string>& neededResources() const = 0;
65 
69  virtual StatusCode execute() = 0;
70 
72  virtual bool isInitialized() const = 0;
74  virtual bool isFinalized() const = 0;
76  virtual bool isExecuted() const = 0;
77 
83  virtual StatusCode sysInitialize() = 0;
84 
90  virtual StatusCode sysStart() = 0;
91 
97  virtual StatusCode sysReinitialize() = 0;
98 
104  virtual StatusCode sysRestart() = 0;
105 
107 #define GAUDI_SYSEXECUTE_WITHCONTEXT 1
108 
110  virtual StatusCode sysExecute(const EventContext&) = 0;
111 
115  virtual StatusCode sysStop() = 0;
116 
120  virtual StatusCode sysFinalize() = 0;
121 
127  virtual StatusCode sysBeginRun( ) = 0;
128 
134  virtual StatusCode sysEndRun( ) = 0;
135 
137  [[deprecated("resetExecuted should be triggered globally via the AlgExecStateSvc, not individually for each Algorithm")]]
138  virtual void resetExecuted( ) = 0;
139 
142  virtual StatusCode beginRun() = 0;
145  virtual StatusCode endRun() = 0;
146 
147 
148  // ---- Function useful for dealing with sub-algorithms
150  virtual void setExecuted( bool state ) = 0;
151 
153  virtual bool isEnabled( ) const = 0;
154 
156  virtual bool filterPassed( ) const = 0;
157 
159  virtual void setFilterPassed( bool state ) = 0;
160 
162  virtual std::ostream& toControlFlowExpression(std::ostream& os) const = 0;
163 
165  virtual const EventContext& getContext() const = 0;
166 
168  virtual void setIndex(const unsigned int& idx) = 0;
169 
170 };
171 
172 #endif // GAUDIKERNEL_IALGORITHM_H
StatusCode execute() override final
struct deprecated("use MergingTransformer instead")]] ListTransformer
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:14
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
STL class.
friend AlgResourcePool
Definition: IAlgorithm.h:31
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Base class to be used to extend an interface.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:27
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
#define GAUDI_API
Definition: Kernel.h:107
STL class.
Helper functions to set/get the application return code.
Definition: __init__.py:1