#include <algorithm>
#include <functional>
#include "GaudiKernel/IAlgContextSvc.h"
#include "GaudiKernel/IAlgorithm.h"
#include "GaudiAlg/GetAlg.h"
#include "GaudiAlg/GetAlgs.h"
#include "GaudiAlg/GaudiAlgorithm.h"
#include "GaudiAlg/GaudiHistoAlg.h"
#include "GaudiAlg/GaudiTupleAlg.h"
#include "GaudiAlg/GaudiSequencer.h"
#include "GaudiAlg/Sequencer.h"
Include dependency graph for GetAlgs.cpp:
Go to the source code of this file.
Functions | |
template<class TYPE> | |
TYPE * | getAlg (const IAlgContextSvc *svc) |
GaudiAlgorithm * | Gaudi::Utils::getGaudiAlg (const IAlgContextSvc *svc) |
simple function to extract the last active GaudiAlgorithm from the context | |
GaudiHistoAlg * | Gaudi::Utils::getHistoAlg (const IAlgContextSvc *svc) |
simple function to extract the last active GaudiHistoAlg from the context | |
GaudiTupleAlg * | Gaudi::Utils::getTupleAlg (const IAlgContextSvc *svc) |
simple function to extract the last active GaudiTupleAlg from the context | |
GaudiSequencer * | Gaudi::Utils::getGaudiSequencer (const IAlgContextSvc *svc) |
simple function to extract the last active GaudiSequencer from the context | |
Sequencer * | Gaudi::Utils::getSequencerAlg (const IAlgContextSvc *svc) |
simple function to extract the last active Sequencer from the context | |
IAlgorithm * | Gaudi::Utils::getSequencer (const IAlgContextSvc *svc) |
simple function to extract the last active "Sequencer" () GaudiSequencer or simple Sequencer) from the context |
Definition in file GetAlgs.cpp.
TYPE* @1::getAlg | ( | const IAlgContextSvc * | svc | ) | [static] |
Definition at line 35 of file GetAlgs.cpp.
00036 { 00037 if ( 0 == svc ) { return 0 ; } // RETURN 00038 typedef IAlgContextSvc::Algorithms ALGS ; 00039 const ALGS& algs = svc->algorithms() ; 00040 ALGS::const_reverse_iterator it = std::find_if 00041 ( algs.rbegin () , 00042 algs.rend () , 00043 Gaudi::Utils::AlgTypeSelector<TYPE>() ) ; 00044 if ( algs.rend() == it ) { return 0 ; } // RETURN 00045 IAlgorithm* alg = *it ; 00046 return dynamic_cast<TYPE*>( alg ) ; // RETURN 00047 }