| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# AlgContextAuditor Class Reference

Description: Rergister/Unregister the AlgContext of each algorithm before entering the algorithm and after leaving it. More...

`#include <AlgContextAuditor.h>`

Inheritance diagram for AlgContextAuditor:
[legend]
Collaboration diagram for AlgContextAuditor:
[legend]

List of all members.

## Public Member Functions
virtual void | beforeInitialize (INamedInterface *a)
virtual void | afterInitialize (INamedInterface *a)
virtual void | beforeExecute (INamedInterface *a)
virtual void | afterExecute (INamedInterface *a, const StatusCode &s)
virtual void | beforeFinalize (INamedInterface *a)
virtual void | afterFinalize (INamedInterface *a)
| AlgContextAuditor (const std::string &name, ISvcLocator *pSvc)
| standard constructor
virtual | ~AlgContextAuditor ()
| virtual desctrutor
virtual StatusCode | initialize ()
| standard initialization,
virtual StatusCode | finalize ()
| standard finalization,
## Private Member Functions
| AlgContextAuditor ()
| no default constructor
| AlgContextAuditor (const AlgContextAuditor &)
| no copy constructor
AlgContextAuditor & | operator= (const AlgContextAuditor &)
| no assignement
## Private Attributes
IAlgContextSvc * | m_svc
| the pointer to Algorithm Context Service

## Detailed Description

Description: Rergister/Unregister the AlgContext of each algorithm before entering the algorithm and after leaving it.

Author:
  M. Shapiro, LBNL

  modified by Vanya BELYAEV ibelyaev@physics.syr.edu

Definition at line 37 of file AlgContextAuditor.h.

## Constructor & Destructor Documentation

AlgContextAuditor::AlgContextAuditor | ( | const std::string & | name,
|  | ISvcLocator * | pSvc |
| ) |  |  |

standard constructor

See also:
  Auditor

Definition at line 72 of file AlgContextAuditor.cpp.

    00074   : Auditor( name , pSvc )
    00075   , m_svc   ( 0    )
    00076 {}

AlgContextAuditor::~AlgContextAuditor | ( |  | ) | `[virtual]`

virtual desctrutor

Definition at line 80 of file AlgContextAuditor.cpp.

    00080 {}

AlgContextAuditor::AlgContextAuditor | ( |  | ) | `[private]`

no default constructor

AlgContextAuditor::AlgContextAuditor | ( | const AlgContextAuditor & |  | ) | `[private]`

no copy constructor

## Member Function Documentation

void AlgContextAuditor::beforeInitialize | ( | INamedInterface * | a | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 116 of file AlgContextAuditor.cpp.

    00116                                                                {
    00117   if ( 0 != m_svc ) {
    00118     IAlgorithm* alg = toAlg(a);
    00119     if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
    00120   }
    00121 }

void AlgContextAuditor::afterInitialize | ( | INamedInterface * | a | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 123 of file AlgContextAuditor.cpp.

    00123                                                                {
    00124   if ( 0 != m_svc ) {
    00125     IAlgorithm* alg = toAlg(a);
    00126     if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
    00127   }
    00128 }

void AlgContextAuditor::beforeExecute | ( | INamedInterface * | a | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 144 of file AlgContextAuditor.cpp.

    00144                                                                {
    00145   if ( 0 != m_svc ) {
    00146     IAlgorithm* alg = toAlg(a);
    00147     if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
    00148   }
    00149 }

void AlgContextAuditor::afterExecute | ( | INamedInterface * | a,
|  | const StatusCode & | s |
| ) |  |  | `[virtual]`

Reimplemented from Auditor.

Definition at line 151 of file AlgContextAuditor.cpp.

    00152                                                                        {
    00153   if ( 0 != m_svc ) {
    00154     IAlgorithm* alg = toAlg(a);
    00155     if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
    00156   }
    00157 }

void AlgContextAuditor::beforeFinalize | ( | INamedInterface * | a | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 130 of file AlgContextAuditor.cpp.

    00130                                                                {
    00131   if ( 0 != m_svc ) {
    00132     IAlgorithm* alg = toAlg(a);
    00133     if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
    00134   }
    00135 }

void AlgContextAuditor::afterFinalize | ( | INamedInterface * | a | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 137 of file AlgContextAuditor.cpp.

    00137                                                                {
    00138   if ( 0 != m_svc ) {
    00139     IAlgorithm* alg = toAlg(a);
    00140     if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
    00141   }
    00142 }

StatusCode AlgContextAuditor::initialize | ( |  | ) | `[virtual]`

standard initialization,

See also:
  IAuditor

Reimplemented from Auditor.

Definition at line 84 of file AlgContextAuditor.cpp.

    00085 {
    00086   // initialize the base class
    00087   StatusCode sc = Auditor::initialize() ;
    00088   if ( sc.isFailure() ) { return sc ; }                           // RETURN
    00089   if ( 0 != m_svc ) { m_svc -> release() ; m_svc = 0 ; }
    00090   sc = Auditor::service ( "AlgContextSvc" , m_svc , true ) ;
    00091   if ( sc.isFailure() )
    00092   {
    00093     MsgStream log ( msgSvc() , name() ) ;
    00094     log << MSG::ERROR << "Unable to locate 'AlgContextSvc'" << sc << endmsg ;
    00095     m_svc = 0 ;
    00096     return sc ;  // RETURN
    00097   }
    00098   if ( 0 == m_svc     )
    00099   {
    00100     MsgStream log ( msgSvc() , name() ) ;
    00101     log << MSG::ERROR << "Invalid pointer to IAlgContextSvc" << endmsg ;
    00102     return StatusCode::FAILURE ;           // RETURN
    00103   }
    00104   return StatusCode::SUCCESS ;
    00105 }

StatusCode AlgContextAuditor::finalize | ( |  | ) | `[virtual]`

standard finalization,

See also:
  IAuditor

Reimplemented from Auditor.

Definition at line 109 of file AlgContextAuditor.cpp.

    00110 {
    00111   if ( 0 != m_svc ) { m_svc-> release() ; m_svc = 0 ; }
    00112   // finalize the base class
    00113   return Auditor::finalize () ;
    00114 }

AlgContextAuditor& AlgContextAuditor::operator= | ( | const AlgContextAuditor & |  | ) | `[private]`

no assignement

## Member Data Documentation

IAlgContextSvc* AlgContextAuditor::m_svc`[private]`

the pointer to Algorithm Context Service

Definition at line 71 of file AlgContextAuditor.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiAud/src/AlgContextAuditor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiAud/src/AlgContextAuditor.cpp