Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
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 AlgExecState;
12 class EventContext;
13 
14 namespace Gaudi {
15  class StringKey;
16 }
17 
28 class GAUDI_API IAlgorithm : virtual public extend_interfaces<INamedInterface, IStateful> {
29 public:
31 
34 
37  virtual const std::string& version() const = 0;
38 
41  virtual const std::string& type() const = 0;
42  virtual void setType( const std::string& ) = 0;
43 
46  virtual const Gaudi::StringKey& nameKey() const = 0;
47 
50  virtual unsigned int index() const = 0;
51 
54  virtual bool isClonable() const { return false; }
55 
59  virtual unsigned int cardinality() const = 0;
60 
63  virtual const std::vector<std::string>& neededResources() const = 0;
64 
68  virtual StatusCode execute( const EventContext& ) const = 0;
69 
71  virtual bool isInitialized() const = 0;
73  virtual bool isFinalized() 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 #define GAUDI_SYSEXECUTE_WITHCONTEXT 1
105 
107  virtual StatusCode sysExecute( const EventContext& ) = 0;
108 
112  virtual StatusCode sysStop() = 0;
113 
117  virtual StatusCode sysFinalize() = 0;
118 
124  virtual StatusCode sysBeginRun() = 0;
125 
131  virtual StatusCode sysEndRun() = 0;
132 
135  virtual StatusCode beginRun() = 0;
138  virtual StatusCode endRun() = 0;
139 
141  virtual AlgExecState& execState( const EventContext& ctx ) const = 0;
142 
144  virtual bool isEnabled() const = 0;
145 
147  virtual bool isSequence() const = 0;
148 
150  virtual std::ostream& toControlFlowExpression( std::ostream& os ) const = 0;
151 
153  virtual void setIndex( const unsigned int& idx ) = 0;
154 
155  virtual bool isReEntrant() const = 0;
156 };
157 
158 #endif // GAUDIKERNEL_IALGORITHM_H
virtual bool isClonable() const
Specify if the algorithm is clonable.
Definition: IAlgorithm.h:54
StatusCode execute() override final
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:31
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:34
STL class.
friend AlgResourcePool
Definition: IAlgorithm.h:30
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:13
Base class to be used to extend an interface.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
#define GAUDI_API
Definition: Kernel.h:71
STL class.
Helper functions to set/get the application return code.
Definition: __init__.py:1