| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

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 Types

typedef std::string CustomEventType
typedef const CustomEventTypeCustomEventTypeRef
 Initialize
 ReInitialize
 Execute
 BeginRun
 EndRun
 Finalize
 Start
 Stop
 ReStart
 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  StandardEventType
enum  Status

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
StatusCode sysInitialize ()
StatusCode sysFinalize ()
virtual void before (StandardEventType, INamedInterface *)
virtual void before (StandardEventType, const std::string &)
virtual void before (CustomEventTypeRef, INamedInterface *)
virtual void before (CustomEventTypeRef, const std::string &)
virtual void before (StandardEventType, INamedInterface *)=0
virtual void before (StandardEventType, const std::string &)=0
virtual void before (CustomEventTypeRef, INamedInterface *)=0
virtual void before (CustomEventTypeRef, const std::string &)=0
virtual void before (StandardEventType, INamedInterface *)=0
virtual void before (StandardEventType, const std::string &)=0
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 after (StandardEventType, INamedInterface *, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
virtual void after (StandardEventType, const std::string &, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
virtual void after (CustomEventTypeRef, INamedInterface *, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
virtual void after (CustomEventTypeRef, const std::string &, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
virtual void after (StandardEventType, INamedInterface *, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
virtual void after (StandardEventType, const std::string &, const StatusCode &sc=StatusCode(StatusCode::SUCCESS, true))=0
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::string & name () const
virtual bool isEnabled () const
IMessageSvcmsgSvc () const
int outputLevel () const
void setOutputLevel (int level)
ISvcLocatorserviceLocator () const
StatusCode service (const std::string &name, T *&svc, bool createIf=false) const
virtual StatusCode setProperty (const Property &p)
virtual StatusCode setProperty (const std::string &s)
virtual StatusCode setProperty (const std::string &n, const std::string &v)
StatusCode setProperty (const std::string &name, const TYPE &value)
virtual StatusCode getProperty (Property *p) const
virtual const PropertygetProperty (const std::string &name) const
virtual StatusCode getProperty (const std::string &n, std::string &v) const
const std::vector< Property * > & getProperties () const
StatusCode setProperties ()
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
unsigned long addRef ()
unsigned long release ()
StatusCode queryInterface (const InterfaceID &riid, void **)

Static Public Member Functions

static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()

Public Attributes

 Initialize
 ReInitialize
 Execute
 BeginRun
 EndRun
 Finalize
 Start
 Stop
 ReStart
 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR

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


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 a  )  [virtual]

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 a  )  [virtual]

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 a  )  [virtual]

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 a,
const StatusCode s 
) [virtual]

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 a  )  [virtual]

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 a  )  [virtual]

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 (  )  [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:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:59:13 2011 for GaudiAud by doxygen 1.4.7