The Gaudi Framework
v26r3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
GetAlg.cpp
Go to the documentation of this file.
1
// $Id: GetAlg.cpp,v 1.1 2007/09/25 16:12:41 marcocle Exp $
2
// ============================================================================
3
// Include files
4
// ============================================================================
5
// GaudiKernel
6
// ============================================================================
7
#include "GaudiKernel/IAlgorithm.h"
8
#include "GaudiKernel/IAlgContextSvc.h"
9
// ============================================================================
10
// GaudiAlg
11
// ============================================================================
12
#include "GaudiAlg/GetAlg.h"
13
// ============================================================================
20
// ============================================================================
21
// virtual destructor
22
// ============================================================================
23
Gaudi::Utils::AlgSelector::~AlgSelector
(){}
24
// ============================================================================
25
// simple function to get the algorithm from Context Service
26
// ============================================================================
27
IAlgorithm
*
28
Gaudi::Utils::getAlgorithm
29
(
const
IAlgContextSvc
* svc ,
30
const
AlgSelector
&
sel
)
31
{
32
if
( 0 == svc ) {
return
0 ; }
// RETURN
33
return
getAlgorithm
( svc->
algorithms
() ,
sel
) ;
34
}
35
// ============================================================================
36
// simple function to get the algorithm from Context Service
37
// ============================================================================
38
IAlgorithm
*
39
Gaudi::Utils::getAlgorithm
40
(
const
std::vector<IAlgorithm*>& lst ,
41
const
AlgSelector
& sel )
42
{
43
for
( std::vector<IAlgorithm*>::const_reverse_iterator it = lst.rbegin() ;
44
lst.rend() != it ; ++it )
45
{
46
// use the selector:
47
if
( sel ( *it ) ) {
return
*it ; }
// return
48
}
49
return
0 ;
50
}
51
// ============================================================================
52
53
54
// ============================================================================
55
// The END
56
// ============================================================================
Gaudi::Utils::AlgSelector::~AlgSelector
virtual ~AlgSelector()
Definition:
GetAlg.cpp:23
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:29
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:20
IAlgContextSvc
An abstract interface for Algorithm Context Service.
Definition:
IAlgContextSvc.h:28
Gaudi::Utils::AlgSelector
Simple interface class for selection of algorithms.
Definition:
GetAlg.h:26
GaudiAlg
src
lib
GetAlg.cpp
Generated on Tue Jul 21 2015 12:23:26 for The Gaudi Framework by
1.8.9.1