Gaudi Framework, version v20r4

Generated: 8 Jan 2009

ChronoAuditor Class Reference

#include <ChronoAuditor.h>

Inheritance diagram for ChronoAuditor:

Inheritance graph
[legend]
Collaboration diagram for ChronoAuditor:

Collaboration graph
[legend]

List of all members.


Detailed Description

Monitors the cpu time usage of each algorithm.

Author:
David Quarrie

Definition at line 14 of file ChronoAuditor.h.


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)
 Audit the start of a custom "event" for callers that do not implement INamedInterface.
virtual void after (CustomEventTypeRef evt, const std::string &caller, const StatusCode &)
 Audit the end of a custom "event" for callers that do not implement INamedInterface.
IChronoStatSvcchronoSvc ()

Private Attributes

IChronoStatSvcm_chronoSvc
StringArrayProperty m_types

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

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 23 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterInitialize ( INamedInterface  )  [virtual]

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 26 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeReinitialize ( INamedInterface  )  [virtual]

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 30 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterReinitialize ( INamedInterface  )  [virtual]

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 33 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeExecute ( INamedInterface  )  [virtual]

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 37 of file ChronoAuditor.cpp.

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

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

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 40 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeBeginRun ( INamedInterface  )  [virtual]

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 44 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterBeginRun ( INamedInterface  )  [virtual]

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 47 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeEndRun ( INamedInterface  )  [virtual]

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 50 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterEndRun ( INamedInterface  )  [virtual]

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 53 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeFinalize ( INamedInterface  )  [virtual]

Deprecated:
use before

Reimplemented from Auditor.

Definition at line 58 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterFinalize ( INamedInterface  )  [virtual]

Deprecated:
use after

Reimplemented from Auditor.

Definition at line 61 of file ChronoAuditor.cpp.

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

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

Audit the start of a custom "event" for callers that do not implement INamedInterface.

Reimplemented from Auditor.

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  ,
const std::string &  ,
const StatusCode sc 
) [virtual]

Audit the end of a custom "event" for callers that do not implement INamedInterface.

Reimplemented from Auditor.

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

Definition at line 36 of file ChronoAuditor.h.

Definition at line 37 of file ChronoAuditor.h.


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

Generated at Thu Jan 8 17:50:46 2009 for Gaudi Framework, version v20r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004