Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
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 // ============================================================================
10 // ============================================================================
11 // GaudiAlg
12 // ============================================================================
13 #include "GaudiAlg/GetAlg.h"
14 // ============================================================================
21 // ============================================================================
22 // simple function to get the algorithm from Context Service
23 // ============================================================================
25  return svc ? getAlgorithm( svc->algorithms(), sel ) : nullptr;
26 }
27 // ============================================================================
28 // simple function to get the algorithm from Context Service
29 // ============================================================================
31  auto it = std::find_if( lst.rbegin(), lst.rend(), std::cref( sel ) );
32  return it != lst.rend() ? *it : nullptr;
33 }
34 // ============================================================================
35 
36 // ============================================================================
37 // The END
38 // ============================================================================
T rend(T...args)
sel
Definition: IOTest.py:93
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:24
T rbegin(T...args)