The Gaudi Framework
v26r1
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
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
// ============================================================================
GaudiAlg
src
lib
GetAlg.cpp
Generated on Mon Feb 16 2015 11:56:52 for The Gaudi Framework by
1.8.2