Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AlgContextAuditor Class Reference

Description: Register/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]

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 destructor
 
virtual StatusCode initialize ()
 standard initialization,
 
virtual StatusCode finalize ()
 standard finalization,
 
- Public Member Functions inherited from Auditor
 Auditor (const std::string &name, ISvcLocator *svcloc)
 Constructor.
 
virtual ~Auditor ()
 Destructor.
 
StatusCode sysInitialize ()
 Initialization method invoked by the framework.
 
StatusCode sysFinalize ()
 Finalization method invoked by the framework.
 
virtual void before (StandardEventType, INamedInterface *)
 The following methods are meant to be implemented by the child class...
 
virtual void before (StandardEventType, const std::string &)
 
virtual void before (CustomEventTypeRef, INamedInterface *)
 
virtual void before (CustomEventTypeRef, const std::string &)
 
virtual void after (StandardEventType, INamedInterface *, const StatusCode &)
 
virtual void after (StandardEventType, const std::string &, const StatusCode &)
 
virtual void after (CustomEventTypeRef, INamedInterface *, const StatusCode &)
 
virtual void after (CustomEventTypeRef, const std::string &, const StatusCode &)
 
virtual void beforeReinitialize (INamedInterface *)
 
virtual void afterReinitialize (INamedInterface *)
 
virtual void beforeBeginRun (INamedInterface *)
 
virtual void afterBeginRun (INamedInterface *)
 
virtual void beforeEndRun (INamedInterface *)
 
virtual void afterEndRun (INamedInterface *)
 
virtual const std::stringname () const
 
virtual bool isEnabled () const
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
int outputLevel () const
 Retrieve the output level of current auditor.
 
void setOutputLevel (int level)
 Set the output level for current auditor.
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator.
 
template<class T >
StatusCode service (const std::string &name, T *&svc, bool createIf=false) const
 Access a service by name, creating it if it doesn't already exist.
 
virtual StatusCode setProperty (const Property &p)
 Set a value of a property of an auditor.
 
virtual StatusCode setProperty (const std::string &s)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Implementation of IProperty::setProperty.
 
virtual StatusCode getProperty (Property *p) const
 Get the value of a property.
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name.
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Implementation of IProperty::getProperty.
 
const std::vector< Property * > & getProperties () const
 Get all properties.
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
StatusCode setProperties ()
 Set the auditor's properties.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 

Private Member Functions

 AlgContextAuditor ()
 the default constructor is disabled
 
 AlgContextAuditor (const AlgContextAuditor &)
 copy constructor is disabled
 
AlgContextAuditoroperator= (const AlgContextAuditor &)
 assignment operator is disabled
 

Private Attributes

IAlgContextSvcm_svc
 the pointer to Algorithm Context Service
 

Additional Inherited Members

- Public Types inherited from implements2< IAuditor, IProperty >
typedef implements2 base_class
 Typedef to this class.
 
typedef extend_interfaces2
< IAuditor, IProperty
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 

Detailed Description

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

Author
M. Shapiro, LBNL
modified by Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

Definition at line 22 of file AlgContextAuditor.h.

Constructor & Destructor Documentation

AlgContextAuditor::AlgContextAuditor ( const std::string name,
ISvcLocator pSvc 
)

standard constructor

See Also
Auditor

Definition at line 43 of file AlgContextAuditor.cpp.

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

virtual destructor

Definition at line 51 of file AlgContextAuditor.cpp.

{}
AlgContextAuditor::AlgContextAuditor ( )
private

the default constructor is disabled

AlgContextAuditor::AlgContextAuditor ( const AlgContextAuditor )
private

copy constructor is disabled

Member Function Documentation

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

Reimplemented from Auditor.

Definition at line 122 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 108 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 94 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 115 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 101 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 87 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 80 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 55 of file AlgContextAuditor.cpp.

{
// initialize the base class
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
}
}
AlgContextAuditor& AlgContextAuditor::operator= ( const AlgContextAuditor )
private

assignment operator is disabled

Member Data Documentation

IAlgContextSvc* AlgContextAuditor::m_svc
private

the pointer to Algorithm Context Service

Definition at line 56 of file AlgContextAuditor.h.


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

Generated at Wed Nov 28 2012 12:17:24 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004