The Gaudi Framework  v30r3 (a5ef0a68)
GetAlg.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 #include <algorithm>
5 // ============================================================================
6 // GaudiKernel
7 // ============================================================================
10 // ============================================================================
11 // GaudiAlg
12 // ============================================================================
13 #include "GaudiAlg/GetAlg.h"
14 // ============================================================================
21 // ============================================================================
22 // simple function to get the algorithm from Context Service
23 // ============================================================================
25 {
26  return svc ? getAlgorithm( svc->algorithms(), sel ) : nullptr;
27 }
28 // ============================================================================
29 // simple function to get the algorithm from Context Service
30 // ============================================================================
32 {
33  auto it = std::find_if( lst.rbegin(), lst.rend(), std::cref( sel ) );
34  return it != lst.rend() ? *it : nullptr;
35 }
36 // ============================================================================
37 
38 // ============================================================================
39 // The END
40 // ============================================================================
T rend(T...args)
sel
Definition: IOTest.py:95
GAUDI_API IAlgorithm * getAlgorithm(const IAlgContextSvc *svc, const AlgSelector &sel)
simple function to get the algorithm from Context Service
Definition: GetAlg.cpp:24
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
virtual const Algorithms & algorithms() const =0
get the stack of executed algorithms
T find_if(T...args)
T cref(T...args)
An abstract interface for Algorithm Context Service.
Simple interface class for selection of algorithms.
Definition: GetAlg.h:26
T rbegin(T...args)