| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

IAlgorithm.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IALGORITHM_H
2 #define GAUDIKERNEL_IALGORITHM_H
3
4 // Include files
5 #include "GaudiKernel/INamedInterface.h"
6 #include "GaudiKernel/IStateful.h"
7 #include <string>
8
9 class IAlgTool;
10 class AlgResourcePool;
11 class EventContext;
12
13 namespace Gaudi
14 {
15 class StringKey;
16 }
17
28 class GAUDI_API IAlgorithm : virtual public extend_interfaces<INamedInterface, IStateful>
29 {
30 public:
31 friend AlgResourcePool;
32
34 DeclareInterfaceID( IAlgorithm, 6, 0 );
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 { return false; }
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 "
138 "Algorithm" )]] virtual void
139 resetExecuted() = 0;
140
143 virtual StatusCode beginRun() = 0;
146 virtual StatusCode endRun() = 0;
147
148 // ---- Function useful for dealing with sub-algorithms
150 virtual void setExecuted( bool state ) const = 0;
151
153 virtual bool isEnabled() const = 0;
154
156 virtual bool isSequence() const = 0;
157
159 virtual bool filterPassed() const = 0;
160
162 virtual void setFilterPassed( bool state ) const = 0;
163
165 virtual std::ostream& toControlFlowExpression( std::ostream& os ) const = 0;
166
168 virtual const EventContext& getContext() const = 0;
169
171 virtual void setIndex( const unsigned int& idx ) = 0;
172 };
173
174 #endif // GAUDIKERNEL_IALGORITHM_H
IAlgorithm::isClonable
virtual bool isClonable() const
Specify if the algorithm is clonable.
Definition: IAlgorithm.h:55
compareRootHistos.state
state
Definition: compareRootHistos.py:424
Gaudi::Functional::execute
StatusCode execute() override final
AlgResourcePool
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
Definition: AlgResourcePool.h:29
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
std::string
STL class.
INamedInterface.h
IAlgorithm::AlgResourcePool
friend AlgResourcePool
Definition: IAlgorithm.h:31
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DeclareInterfaceID
#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
extend_interfaces
Base class to be used to extend an interface.
Definition: extend_interfaces.h:11
gaudirun.type
type
Definition: gaudirun.py:133
IStateful.h
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
std::vector< std::string >
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
AvalancheSchedulerSimpleTest.cardinality
int cardinality
Definition: AvalancheSchedulerSimpleTest.py:40
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
std::ostream
STL class.
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1