Gaudi Framework, version v22r1

Home   Generated: Mon Feb 28 2011
Public Member Functions | Private Member Functions | Private Attributes

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:
Inheritance graph
[legend]
Collaboration diagram for AlgContextAuditor:
Collaboration graph
[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
AlgContextAuditoroperator= (const AlgContextAuditor &)
 no assignement

Private Attributes

IAlgContextSvcm_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.

  : Auditor( name , pSvc )
  , m_svc   ( 0    )
{}
AlgContextAuditor::~AlgContextAuditor (  ) [virtual]

virtual desctrutor

Definition at line 80 of file AlgContextAuditor.cpp.

{}
AlgContextAuditor::AlgContextAuditor (  ) [private]

no default constructor

AlgContextAuditor::AlgContextAuditor ( const AlgContextAuditor  ) [private]

no copy constructor


Member Function Documentation

void AlgContextAuditor::afterExecute ( INamedInterface a,
const StatusCode s 
) [virtual]

Reimplemented from Auditor.

Definition at line 151 of file AlgContextAuditor.cpp.

                                                                       {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
  }
}
void AlgContextAuditor::afterFinalize ( INamedInterface a ) [virtual]

Reimplemented from Auditor.

Definition at line 137 of file AlgContextAuditor.cpp.

                                                               {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
  }
}
void AlgContextAuditor::afterInitialize ( INamedInterface a ) [virtual]

Reimplemented from Auditor.

Definition at line 123 of file AlgContextAuditor.cpp.

                                                               {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> unSetCurrentAlg ( alg ).ignore() ;
  }
}
void AlgContextAuditor::beforeExecute ( INamedInterface a ) [virtual]

Reimplemented from Auditor.

Definition at line 144 of file AlgContextAuditor.cpp.

                                                               {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
  }
}
void AlgContextAuditor::beforeFinalize ( INamedInterface a ) [virtual]

Reimplemented from Auditor.

Definition at line 130 of file AlgContextAuditor.cpp.

                                                               {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
  }
}
void AlgContextAuditor::beforeInitialize ( INamedInterface a ) [virtual]

Reimplemented from Auditor.

Definition at line 116 of file AlgContextAuditor.cpp.

                                                               {
  if ( 0 != m_svc ) {
    IAlgorithm* alg = toAlg(a);
    if (alg != 0) m_svc -> setCurrentAlg ( alg ).ignore() ;
  }
}
StatusCode AlgContextAuditor::finalize (  ) [virtual]

standard finalization,

See also:
IAuditor

Reimplemented from Auditor.

Definition at line 109 of file AlgContextAuditor.cpp.

{
  if ( 0 != m_svc ) { m_svc-> release() ; m_svc = 0 ; }
  // finalize the base class
  return Auditor::finalize () ;
}
StatusCode AlgContextAuditor::initialize (  ) [virtual]

standard initialization,

See also:
IAuditor

Reimplemented from Auditor.

Definition at line 84 of file AlgContextAuditor.cpp.

{
  // initialize the base class
  StatusCode sc = Auditor::initialize() ;
  if ( sc.isFailure() ) { return sc ; }                           // RETURN
  if ( 0 != m_svc ) { m_svc -> release() ; m_svc = 0 ; }
  sc = Auditor::service ( "AlgContextSvc" , m_svc , true ) ;
  if ( sc.isFailure() )
  {
    MsgStream log ( msgSvc() , name() ) ;
    log << MSG::ERROR << "Unable to locate 'AlgContextSvc'" << sc << endmsg ;
    m_svc = 0 ;
    return sc ;  // RETURN
  }
  if ( 0 == m_svc     )
  {
    MsgStream log ( msgSvc() , name() ) ;
    log << MSG::ERROR << "Invalid pointer to IAlgContextSvc" << endmsg ;
    return StatusCode::FAILURE ;           // RETURN
  }
  return StatusCode::SUCCESS ;
}
AlgContextAuditor& AlgContextAuditor::operator= ( const AlgContextAuditor  ) [private]

no assignement


Member Data Documentation

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Mon Feb 28 2011 18:27:54 for Gaudi Framework, version v22r1 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004