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 namespace Gaudi {
12  class StringKey;
13 }
14 
25 class GAUDI_API IAlgorithm : virtual public extend_interfaces<INamedInterface,
26  IStateful> {
27 public:
28 
30 
33 
36  virtual const std::string& version() const = 0;
37 
40  virtual const std::string& type() const = 0;
41  virtual void setType(const std::string& ) = 0;
42 
45  virtual const Gaudi::StringKey& nameKey() const = 0;
46 
49  virtual unsigned int index() const = 0;
50 
53  virtual bool isClonable() const = 0;
54 
57  virtual unsigned int cardinality() const = 0;
58 
61  virtual const std::vector<std::string>& neededResources() const = 0;
62 
66  virtual StatusCode execute() = 0;
67 
69  virtual bool isInitialized() const = 0;
71  virtual bool isFinalized() const = 0;
73  virtual bool isExecuted() const = 0;
74 
80  virtual StatusCode sysInitialize() = 0;
81 
87  virtual StatusCode sysStart() = 0;
88 
94  virtual StatusCode sysReinitialize() = 0;
95 
101  virtual StatusCode sysRestart() = 0;
102 
104  virtual StatusCode sysExecute() = 0;
105 
109  virtual StatusCode sysStop() = 0;
110 
114  virtual StatusCode sysFinalize() = 0;
115 
121  virtual StatusCode sysBeginRun( ) = 0;
122 
128  virtual StatusCode sysEndRun( ) = 0;
129 
131  virtual void resetExecuted( ) = 0;
132 
135  virtual StatusCode beginRun() = 0;
138  virtual StatusCode endRun() = 0;
139 
140 
141  // ---- Function useful for dealing with sub-algorithms
143  virtual void setExecuted( bool state ) = 0;
144 
146  virtual bool isEnabled( ) const = 0;
147 
149  virtual bool filterPassed( ) const = 0;
150 
152  virtual void setFilterPassed( bool state ) = 0;
153 
154  protected:
156  virtual void setIndex(const unsigned int& idx) = 0;
157 
158 };
159 
160 #endif // GAUDIKERNEL_IALGORITHM_H
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
STL class.
string type
Definition: gaudirun.py:151
friend AlgResourcePool
Definition: IAlgorithm.h:29
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:25
#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 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