The Gaudi Framework
v27r0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
GetAlg.cpp
Go to the documentation of this file.
1
// ============================================================================
2
// Include files
3
// ============================================================================
4
#include <algorithm>
5
// ============================================================================
6
// GaudiKernel
7
// ============================================================================
8
#include "GaudiKernel/IAlgorithm.h"
9
#include "GaudiKernel/IAlgContextSvc.h"
10
// ============================================================================
11
// GaudiAlg
12
// ============================================================================
13
#include "GaudiAlg/GetAlg.h"
14
// ============================================================================
21
// ============================================================================
22
// simple function to get the algorithm from Context Service
23
// ============================================================================
24
IAlgorithm
*
25
Gaudi::Utils::getAlgorithm
26
(
const
IAlgContextSvc
* svc ,
27
const
AlgSelector
&
sel
)
28
{
29
return
svc ?
getAlgorithm
( svc->
algorithms
() ,
sel
) :
nullptr
;
30
}
31
// ============================================================================
32
// simple function to get the algorithm from Context Service
33
// ============================================================================
34
IAlgorithm
*
35
Gaudi::Utils::getAlgorithm
36
(
const
std::vector<IAlgorithm*>& lst ,
37
const
AlgSelector
& sel )
38
{
39
auto
it = std::find_if( lst.rbegin(), lst.rend(), std::cref(sel));
40
return
it != lst.rend() ? *it : nullptr ;
41
}
42
// ============================================================================
43
44
// ============================================================================
45
// The END
46
// ============================================================================
Gaudi::Utils::getAlgorithm
GAUDI_API IAlgorithm * getAlgorithm(const IAlgContextSvc *svc, const AlgSelector &sel)
simple function to get the algorithm from Context Service
Definition:
GetAlg.cpp:26
IAlgContextSvc::algorithms
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
read_lhcb_event_file.sel
tuple sel
Definition:
read_lhcb_event_file.py:10
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition:
IAlgorithm.h:23
IAlgContextSvc
An abstract interface for Algorithm Context Service.
Definition:
IAlgContextSvc.h:23
Gaudi::Utils::AlgSelector
Simple interface class for selection of algorithms.
Definition:
GetAlg.h:26
GaudiAlg
src
lib
GetAlg.cpp
Generated on Thu Feb 4 2016 16:42:09 for The Gaudi Framework by
1.8.9.1