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 
59  virtual unsigned int cardinality() const = 0;
60 
63  virtual const std::vector<std::string>& neededResources() const = 0;
64 
68  virtual StatusCode execute() = 0;
69 
71  virtual bool isInitialized() const = 0;
73  virtual bool isFinalized() const = 0;
75  virtual bool isExecuted() const = 0;
76 
82  virtual StatusCode sysInitialize() = 0;
83 
89  virtual StatusCode sysStart() = 0;
90 
96  virtual StatusCode sysReinitialize() = 0;
97 
103  virtual StatusCode sysRestart() = 0;
104 
106  virtual StatusCode sysExecute() = 0;
107 
111  virtual StatusCode sysStop() = 0;
112 
116  virtual StatusCode sysFinalize() = 0;
117 
123  virtual StatusCode sysBeginRun( ) = 0;
124 
130  virtual StatusCode sysEndRun( ) = 0;
131 
133  [[deprecated("resetExecuted should be triggered globally via the AlgExecStateSvc, not individually for each Algorithm")]]
134  virtual void resetExecuted( ) = 0;
135 
138  virtual StatusCode beginRun() = 0;
141  virtual StatusCode endRun() = 0;
142 
143 
144  // ---- Function useful for dealing with sub-algorithms
146  virtual void setExecuted( bool state ) = 0;
147 
149  virtual bool isEnabled( ) const = 0;
150 
152  virtual bool filterPassed( ) const = 0;
153 
155  virtual void setFilterPassed( bool state ) = 0;
156 
159  virtual const EventContext* getContext() const = 0;
160 
162  virtual void setContext(const EventContext* context) = 0;
163 
164 
165  protected:
167  virtual void setIndex(const unsigned int& idx) = 0;
168 
169 };
170 
171 #endif // GAUDIKERNEL_IALGORITHM_H
#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
Helper functions to set/get the application return code.
Definition: __init__.py:1