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
GaudiAlg
src
lib
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
// ============================================================================
Generated at Wed Jun 4 2014 14:48:55 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004