Gaudi Framework, version v23r6
Home
Generated: Wed Jan 30 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiCoreSvc
src
ApplicationMgr
AlgorithmManager.h
Go to the documentation of this file.
1
// $Id: AlgorithmManager.h,v 1.4 2008/06/02 14:21:35 marcocle Exp $ //
2
#ifndef GAUDISVC_ALGORITHMMANAGER_H
3
#define GAUDISVC_ALGORITHMMANAGER_H
4
5
// Include files
6
#include "
GaudiKernel/Kernel.h
"
7
#include "
GaudiKernel/IAlgManager.h
"
8
#include "
GaudiKernel/IStateful.h
"
9
#include "
GaudiKernel/ComponentManager.h
"
10
#include "
GaudiKernel/SmartIF.h
"
11
#include "
GaudiKernel/IAlgorithm.h
"
12
#include <
string
>
13
#include <
list
>
14
#include <
map
>
15
16
// Forward declarations
17
class
ISvcLocator
;
18
class
IMessageSvc
;
19
32
class
AlgorithmManager
:
public
extends1
<ComponentManager, IAlgManager>{
33
public
:
34
35
struct
AlgorithmItem
{
36
AlgorithmItem
(
IAlgorithm
*
s
,
bool
managed
=
false
):
37
algorithm
(s),
managed
(
managed
) {}
38
SmartIF<IAlgorithm>
algorithm
;
39
bool
managed
;
40
inline
bool
operator==
(
const
std::string
&
name
)
const
{
41
return
algorithm
->name() ==
name
;
42
}
43
inline
bool
operator==
(
const
IAlgorithm
*ptr)
const
{
44
return
algorithm
.
get
() == ptr;
45
}
46
};
47
49
typedef
std::list<AlgorithmItem>
ListAlg
;
50
52
AlgorithmManager
(
IInterface
* iface );
54
virtual
~AlgorithmManager
();
55
57
virtual
StatusCode
addAlgorithm
(
IAlgorithm
* alg);
59
virtual
StatusCode
removeAlgorithm
(
IAlgorithm
* alg);
61
virtual
StatusCode
createAlgorithm
(
const
std::string
& algtype,
const
std::string
& algname,
62
IAlgorithm
*&
algorithm
,
bool
managed =
false
);
63
65
virtual
bool
existsAlgorithm
(
const
std::string
&
name
)
const
;
67
virtual
const
std::list<IAlgorithm*>
&
getAlgorithms
()
const
;
68
70
virtual
StatusCode
initialize
();
72
virtual
StatusCode
start
();
74
virtual
StatusCode
stop
();
76
virtual
StatusCode
finalize
();
77
79
virtual
StatusCode
reinitialize
();
81
virtual
StatusCode
restart
();
82
84
const
std::string
&
name
()
const
{
85
static
std::string
_name =
"AlgorithmManager"
;
86
return
_name;
87
}
88
89
virtual
SmartIF<IAlgorithm>
&
algorithm
(
const
Gaudi::Utils::TypeNameString &
typeName
,
const
bool
createIf =
true
);
90
91
private
:
92
ListAlg
m_listalg
;
93
95
mutable
std::list<IAlgorithm*>
m_listOfPtrs
;
96
97
};
98
#endif // GAUDISVC_ALGORITHMFACTORY_H
99
Generated at Wed Jan 30 2013 17:13:38 for Gaudi Framework, version v23r6 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004