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

In This Package:

ChronoAuditor Class Reference

Monitors the cpu time usage of each algorithm. More...

#include <ChronoAuditor.h>

Inheritance diagram for ChronoAuditor:

[legend]
Collaboration diagram for ChronoAuditor:
[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

 ChronoAuditor (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~ChronoAuditor ()
virtual void beforeInitialize (INamedInterface *alg)
virtual void afterInitialize (INamedInterface *alg)
virtual void beforeReinitialize (INamedInterface *alg)
virtual void afterReinitialize (INamedInterface *alg)
virtual void beforeExecute (INamedInterface *alg)
virtual void afterExecute (INamedInterface *alg, const StatusCode &)
virtual void beforeBeginRun (INamedInterface *alg)
virtual void afterBeginRun (INamedInterface *alg)
virtual void beforeEndRun (INamedInterface *alg)
virtual void afterEndRun (INamedInterface *alg)
virtual void beforeFinalize (INamedInterface *alg)
virtual void afterFinalize (INamedInterface *alg)
virtual void before (CustomEventTypeRef evt, const std::string &caller)
virtual void after (CustomEventTypeRef evt, const std::string &caller, const StatusCode &)
IChronoStatSvcchronoSvc ()
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 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 StatusCode initialize ()
virtual StatusCode finalize ()
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 Attributes

IChronoStatSvcm_chronoSvc
StringArrayProperty m_types

Detailed Description

Monitors the cpu time usage of each algorithm.

Author:
David Quarrie

Definition at line 14 of file ChronoAuditor.h.


Constructor & Destructor Documentation

ChronoAuditor::ChronoAuditor ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Definition at line 13 of file ChronoAuditor.cpp.

00014 : Auditor(name, pSvcLocator) {
00015   service( "ChronoStatSvc", m_chronoSvc, true).ignore();
00016   declareProperty("CustomEventTypes",m_types);
00017 }

ChronoAuditor::~ChronoAuditor (  )  [virtual]

Definition at line 19 of file ChronoAuditor.cpp.

00019                              {
00020   m_chronoSvc->release();
00021 }


Member Function Documentation

void ChronoAuditor::beforeInitialize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 23 of file ChronoAuditor.cpp.

00023                                                          {
00024   chronoSvc( )->chronoStart( alg->name() + ":initialize" ) ;
00025 }

void ChronoAuditor::afterInitialize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 26 of file ChronoAuditor.cpp.

00026                                                         {
00027   chronoSvc( )->chronoStop( alg->name() + ":initialize" ) ;
00028 }

void ChronoAuditor::beforeReinitialize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 30 of file ChronoAuditor.cpp.

00030                                                            {
00031   chronoSvc( )->chronoStart( alg->name() + ":reinitialize" ) ;
00032 }

void ChronoAuditor::afterReinitialize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 33 of file ChronoAuditor.cpp.

00033                                                           {
00034   chronoSvc( )->chronoStop( alg->name() + ":reinitialize" ) ;
00035 }

void ChronoAuditor::beforeExecute ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 37 of file ChronoAuditor.cpp.

00037                                                       {
00038   chronoSvc( )->chronoStart( alg->name() + ":execute" ) ;
00039 }

void ChronoAuditor::afterExecute ( INamedInterface alg,
const StatusCode  
) [virtual]

Reimplemented from Auditor.

Definition at line 40 of file ChronoAuditor.cpp.

00040                                                                           {
00041   chronoSvc( )->chronoStop( alg->name() + ":execute" ) ;
00042 }

void ChronoAuditor::beforeBeginRun ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 44 of file ChronoAuditor.cpp.

00044                                                        {
00045   chronoSvc( )->chronoStart( alg->name() + ":beginRun" ) ;
00046 }

void ChronoAuditor::afterBeginRun ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 47 of file ChronoAuditor.cpp.

00047                                                       {
00048   chronoSvc( )->chronoStop( alg->name() + ":beginRun" ) ;
00049 }

void ChronoAuditor::beforeEndRun ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 50 of file ChronoAuditor.cpp.

00050                                                      {
00051   chronoSvc( )->chronoStart( alg->name() + ":endRun" ) ;
00052 }

void ChronoAuditor::afterEndRun ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 53 of file ChronoAuditor.cpp.

00053                                                     {
00054   chronoSvc( )->chronoStop( alg->name() + ":endRun" ) ;
00055 }

void ChronoAuditor::beforeFinalize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 58 of file ChronoAuditor.cpp.

00058                                                         {
00059   chronoSvc( )->chronoStart( alg->name() + ":finalize" ) ;
00060 }

void ChronoAuditor::afterFinalize ( INamedInterface alg  )  [virtual]

Reimplemented from Auditor.

Definition at line 61 of file ChronoAuditor.cpp.

00061                                                       {
00062   chronoSvc( )->chronoStop( alg->name() + ":finalize" ) ;
00063 }

void ChronoAuditor::before ( CustomEventTypeRef  evt,
const std::string &  caller 
) [virtual]

Definition at line 66 of file ChronoAuditor.cpp.

00066                                                                      {
00067 
00068   if (m_types.value().size() != 0) {
00069     if ( (m_types.value())[0] == "none") {
00070       return;
00071     }
00072 
00073     if ( find(m_types.value().begin(), m_types.value().end(), evt) ==
00074          m_types.value().end() ) {
00075       return;
00076     }
00077   }
00078 
00079   chronoSvc( )->chronoStart( caller + ":" + evt ) ;
00080 
00081 }

void ChronoAuditor::after ( CustomEventTypeRef  evt,
const std::string &  caller,
const StatusCode  
) [virtual]

Definition at line 84 of file ChronoAuditor.cpp.

00084                                                                                        {
00085 
00086   if (m_types.value().size() != 0) {
00087     if ( (m_types.value())[0] == "none") {
00088       return;
00089     }
00090 
00091     if ( find(m_types.value().begin(), m_types.value().end(), evt) ==
00092          m_types.value().end() ) {
00093       return;
00094     }
00095   }
00096 
00097   chronoSvc( )->chronoStop( caller + ":" + evt ) ;
00098 
00099 }

IChronoStatSvc* ChronoAuditor::chronoSvc (  )  [inline]

Definition at line 34 of file ChronoAuditor.h.

00034 { return m_chronoSvc; }


Member Data Documentation

IChronoStatSvc* ChronoAuditor::m_chronoSvc [private]

Definition at line 36 of file ChronoAuditor.h.

StringArrayProperty ChronoAuditor::m_types [private]

Definition at line 37 of file ChronoAuditor.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