Gaudi Framework, version v21r7

Home   Generated: 22 Jan 2010

ChronoAuditor Class Reference

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

#include <ChronoAuditor.h>

Inheritance diagram for ChronoAuditor:

Inheritance graph
[legend]
Collaboration diagram for ChronoAuditor:

Collaboration graph
[legend]

List of all members.

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 ()

Private Attributes

IChronoStatSvcm_chronoSvc
StringArrayProperty m_types


Detailed Description

Monitors the cpu time usage of each algorithm.

Author:
David Quarrie

Definition at line 13 of file ChronoAuditor.h.


Constructor & Destructor Documentation

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

Definition at line 12 of file ChronoAuditor.cpp.

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

ChronoAuditor::~ChronoAuditor (  )  [virtual]

Definition at line 18 of file ChronoAuditor.cpp.

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


Member Function Documentation

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

Reimplemented from Auditor.

Definition at line 22 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 25 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 29 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 32 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 36 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 39 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 43 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 46 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 49 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 52 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 57 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 60 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 65 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 83 of file ChronoAuditor.cpp.

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

IChronoStatSvc* ChronoAuditor::chronoSvc (  )  [inline]

Definition at line 33 of file ChronoAuditor.h.

00033 { return m_chronoSvc; }


Member Data Documentation

Definition at line 35 of file ChronoAuditor.h.

Definition at line 36 of file ChronoAuditor.h.


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

Generated at Fri Jan 22 20:39:13 2010 for Gaudi Framework, version v21r7 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004