The Gaudi Framework
master (57817a18)
Toggle main menu visibility
Loading...
Searching...
No Matches
IAlgManager.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/IComponentManager.h
>
14
#include <
GaudiKernel/SmartIF.h
>
15
#include <
GaudiKernel/TypeNameString.h
>
16
#include <list>
17
#include <string>
18
19
class
IService
;
20
class
IAlgorithm
;
21
class
ISvcLocator
;
22
34
class
GAUDI_API
IAlgManager
:
virtual
public
IComponentManager
{
35
public
:
37
DeclareInterfaceID
(
IAlgManager
, 6, 0 );
38
40
virtual
StatusCode
addAlgorithm
(
IAlgorithm
* alg
// Pointer to the Algorithm
41
) = 0;
43
virtual
StatusCode
removeAlgorithm
(
IAlgorithm
* alg
// Pointer to the Algorithm
44
) = 0;
47
virtual
StatusCode
createAlgorithm
(
const
std::string& algtype,
// Algorithm type name
48
const
std::string& algname,
// Algorithm name to be assigned
49
IAlgorithm
*& alg,
// Returned algorithm
50
bool
managed =
false
,
// Flag to indicate if the algorithm is managed
51
bool
checkIfExists =
true
// Flag to indicate if clones of existing algorithms can
52
// be created
53
) = 0;
55
virtual
bool
existsAlgorithm
( std::string_view name
// Algorithm name to be searched
56
)
const
= 0;
58
virtual
std::vector<IAlgorithm*>
getAlgorithms
()
const
= 0;
59
61
virtual
SmartIF<IAlgorithm>
&
algorithm
(
const
Gaudi::Utils::TypeNameString
& typeName,
62
const
bool
createIf =
true
) = 0;
63
65
template
<
typename
T>
66
inline
SmartIF<T>
algorithm
(
const
Gaudi::Utils::TypeNameString
& typeName,
const
bool
createIf =
true
) {
67
return
SmartIF<T>
(
algorithm
( typeName, createIf ) );
68
}
69
};
IComponentManager.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
SmartIF.h
TypeNameString.h
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition
TypeNameString.h:19
IAlgManager
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition
IAlgManager.h:34
IAlgManager::removeAlgorithm
virtual StatusCode removeAlgorithm(IAlgorithm *alg)=0
Remove an algorithm from the list of known algorithms.
IAlgManager::algorithm
SmartIF< T > algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)
Returns a smart pointer to the requested interface of a service.
Definition
IAlgManager.h:66
IAlgManager::DeclareInterfaceID
DeclareInterfaceID(IAlgManager, 6, 0)
InterfaceID.
IAlgManager::existsAlgorithm
virtual bool existsAlgorithm(std::string_view name) const =0
Check the existence of an algorithm with a given name in the list of known algorithms.
IAlgManager::getAlgorithms
virtual std::vector< IAlgorithm * > getAlgorithms() const =0
Return the list of Algorithms.
IAlgManager::createAlgorithm
virtual StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&alg, bool managed=false, bool checkIfExists=true)=0
Create an instance of a algorithm type that has been declared beforehand and assigns to it a name.
IAlgManager::algorithm
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
IAlgManager::addAlgorithm
virtual StatusCode addAlgorithm(IAlgorithm *alg)=0
Add an algorithm to the list of known algorithms.
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition
IAlgorithm.h:37
IComponentManager
Definition
IComponentManager.h:15
IService
General service interface definition.
Definition
IService.h:26
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition
ISvcLocator.h:42
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition
SmartIF.h:28
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
GaudiKernel
include
GaudiKernel
IAlgManager.h
Generated on
for The Gaudi Framework by
1.17.0