3 #ifndef GAUDIALG_GETALG_H
4 #define GAUDIALG_GETALG_H 1
10 #include "GaudiKernel/IAlgorithm.h"
30 virtual bool operator() (
const IAlgorithm* )
const = 0 ;
32 virtual ~AlgSelector () ;
42 class GAUDI_API AlgTypeSelector :
public AlgSelector
46 virtual bool operator() (
const IAlgorithm* a )
const
47 {
return dynamic_cast<const TYPE*
>( a ) != 0; }
51 class AlgTypeSelector<TYPE*> :
public AlgTypeSelector<TYPE> {} ;
54 class AlgTypeSelector<const TYPE*> :
public AlgTypeSelector<TYPE> {} ;
57 class AlgTypeSelector<TYPE&> :
public AlgTypeSelector<TYPE> {} ;
60 class AlgTypeSelector<const TYPE&> :
public AlgTypeSelector<TYPE> {} ;
63 class AlgTypeSelector<const TYPE> :
public AlgTypeSelector<TYPE> {} ;
71 class GAUDI_API AlgNameSelector :
public AlgSelector
75 AlgNameSelector (
const std::string& name ) : m_name ( name ) {}
77 virtual bool operator() (
const IAlgorithm* a )
const
78 {
return 0 != a ? a->
name() == m_name :
false ; }
119 const AlgSelector&
sel ) ;
144 (
const std::vector<IAlgorithm*>& lst ,
145 const AlgSelector&
sel ) ;
152 #endif // GAUDIALG_GETALG_H
GAUDI_API IAlgorithm * getAlgorithm(const IAlgContextSvc *svc, const AlgSelector &sel)
simple function to get the algorithm from Context Service
virtual const std::string & name() const =0
Retrieve the name of the instance.
The IAlgorithm is the interface implemented by the Algorithm base class.
An abstract interface for Algorithm Context Service.
Helper functions to set/get the application return code.