| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# GetAlgs.cpp File Reference

Implementation file for the functions from the file GaudiKernel/GetAlgs.h. More...

`#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)
GAUDI_API GaudiAlgorithm * | Gaudi::Utils::getGaudiAlg (const IAlgContextSvc *svc)
| simple function to extract the last active GaudiAlgorithm from the context
GAUDI_API GaudiHistoAlg * | Gaudi::Utils::getHistoAlg (const IAlgContextSvc *svc)
| simple function to extract the last active GaudiHistoAlg from the context
GAUDI_API GaudiTupleAlg * | Gaudi::Utils::getTupleAlg (const IAlgContextSvc *svc)
| simple function to extract the last active GaudiTupleAlg from the context
GAUDI_API GaudiSequencer * | Gaudi::Utils::getGaudiSequencer (const IAlgContextSvc *svc)
| simple function to extract the last active GaudiSequencer from the context
GAUDI_API Sequencer * | Gaudi::Utils::getSequencerAlg (const IAlgContextSvc *svc)
| simple function to extract the last active Sequencer from the context
GAUDI_API IAlgorithm * | Gaudi::Utils::getSequencer (const IAlgContextSvc *svc)
| simple function to extract the last active "Sequencer" () GaudiSequencer or simple Sequencer) from the context

## Detailed Description

Implementation file for the functions from the file GaudiKernel/GetAlgs.h.

Author:
  Vanya BELYAEV ibelyaev@physics.syr.edu

Date:
  2007-09-07

Definition in file GetAlgs.cpp.

## Function Documentation

template<class TYPE>

TYPE* @76::getAlg | ( | const IAlgContextSvc * | svc | ) | `[inline, 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   }