Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
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
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiCoreSvc
src
ApplicationMgr
AlgorithmManager.h
Go to the documentation of this file.
1
#ifndef GAUDISVC_ALGORITHMMANAGER_H
2
#define GAUDISVC_ALGORITHMMANAGER_H
3
4
// Include files
5
#include "
GaudiKernel/Kernel.h
"
6
#include "
GaudiKernel/IAlgManager.h
"
7
#include "
GaudiKernel/IStateful.h
"
8
#include "
GaudiKernel/ComponentManager.h
"
9
#include "
GaudiKernel/SmartIF.h
"
10
#include "
GaudiKernel/IAlgorithm.h
"
11
#include <string>
12
#include <list>
13
#include <map>
14
15
// Forward declarations
16
class
ISvcLocator
;
17
class
IMessageSvc
;
18
31
class
AlgorithmManager
:
public
extends1
<ComponentManager, IAlgManager>{
32
public
:
33
34
struct
AlgorithmItem
{
35
AlgorithmItem
(
IAlgorithm
*
s
,
bool
managed
=
false
):
36
algorithm
(s),
managed
(
managed
) {}
37
SmartIF<IAlgorithm>
algorithm
;
38
bool
managed
;
39
inline
bool
operator==
(
const
std::string &
name
)
const
{
40
return
algorithm
->name() ==
name
;
41
}
42
inline
bool
operator==
(
const
IAlgorithm
*ptr)
const
{
43
return
algorithm
.
get
() == ptr;
44
}
45
};
46
48
typedef
std::list<AlgorithmItem>
ListAlg
;
49
typedef
std::map<std::string, std::string>
AlgTypeAliasesMap
;
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
AlgTypeAliasesMap
&
typeAliases
() {
return
m_algTypeAliases
; }
92
const
AlgTypeAliasesMap
&
typeAliases
()
const
{
return
m_algTypeAliases
; }
93
94
private
:
95
ListAlg
m_listalg
;
96
98
mutable
std::list<IAlgorithm*>
m_listOfPtrs
;
99
100
AlgTypeAliasesMap
m_algTypeAliases
;
101
102
};
103
#endif // GAUDISVC_ALGORITHMFACTORY_H
104
Generated at Wed Jun 4 2014 14:48:56 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004