| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# AlgContextAuditor Class Reference

`#include <AlgContextAuditor.h>`

Inheritance diagram for AlgContextAuditor:

[legend]
Collaboration diagram for AlgContextAuditor:

[legend]

List of all members.

## 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 39 of file AlgContextAuditor.h.

## 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, see
virtual StatusCode | finalize ()
| standard finalization, see
## 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

## Constructor & Destructor Documentation

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

standard constructor

See also:
  Auditor

Definition at line 73 of file AlgContextAuditor.cpp.

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

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

virtual desctrutor

Definition at line 81 of file AlgContextAuditor.cpp.

    00081 {}

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

no default constructor

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

no copy constructor

## Member Function Documentation

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

Deprecated:
  use before

Reimplemented from Auditor.

Definition at line 117 of file AlgContextAuditor.cpp.

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

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

Deprecated:
  use after

Reimplemented from Auditor.

Definition at line 124 of file AlgContextAuditor.cpp.

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

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

Deprecated:
  use before

Reimplemented from Auditor.

Definition at line 145 of file AlgContextAuditor.cpp.

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

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

Deprecated:
  use after

Reimplemented from Auditor.

Definition at line 152 of file AlgContextAuditor.cpp.

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

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

Deprecated:
  use before

Reimplemented from Auditor.

Definition at line 131 of file AlgContextAuditor.cpp.

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

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

Deprecated:
  use after

Reimplemented from Auditor.

Definition at line 138 of file AlgContextAuditor.cpp.

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

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

standard initialization, see

Reimplemented from Auditor.

Definition at line 85 of file AlgContextAuditor.cpp.

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

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

standard finalization, see

Reimplemented from Auditor.

Definition at line 110 of file AlgContextAuditor.cpp.

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

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 73 of file AlgContextAuditor.h.

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

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