| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# 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 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 &)
IChronoStatSvc * | chronoSvc ()
## Private Attributes
IChronoStatSvc * | m_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 18 of file ChronoAuditor.cpp.

    00019 : Auditor(name, pSvcLocator) {
    00020   service( "ChronoStatSvc", m_chronoSvc, true).ignore();
    00021   declareProperty("CustomEventTypes",m_types);
    00022 }

ChronoAuditor::~ChronoAuditor | ( |  | ) | `[virtual]`

Definition at line 24 of file ChronoAuditor.cpp.

    00024                              {
    00025   m_chronoSvc->release();
    00026 }

## Member Function Documentation

void ChronoAuditor::beforeInitialize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 28 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterInitialize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 31 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeReinitialize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 35 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterReinitialize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 38 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeExecute | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 42 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterExecute | ( | INamedInterface * | alg,
|  | const StatusCode & |  |
| ) |  |  | `[virtual]`

Reimplemented from Auditor.

Definition at line 45 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeBeginRun | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 49 of file ChronoAuditor.cpp.

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

void ChronoAuditor::afterBeginRun | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 52 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeEndRun | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 55 of file ChronoAuditor.cpp.

    00055                                                      {
    00056   chronoSvc( )->chronoStart( alg->name() + ":endRun" ) ;
    00057 }

void ChronoAuditor::afterEndRun | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 58 of file ChronoAuditor.cpp.

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

void ChronoAuditor::beforeFinalize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 63 of file ChronoAuditor.cpp.

    00063                                                         {
    00064   chronoSvc( )->chronoStart( alg->name() + ":finalize" ) ;
    00065 }

void ChronoAuditor::afterFinalize | ( | INamedInterface * | alg | ) | `[virtual]`

Reimplemented from Auditor.

Definition at line 66 of file ChronoAuditor.cpp.

    00066                                                       {
    00067   chronoSvc( )->chronoStop( alg->name() + ":finalize" ) ;
    00068 }

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

Reimplemented from Auditor.

Definition at line 71 of file ChronoAuditor.cpp.

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

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

Reimplemented from Auditor.

Definition at line 89 of file ChronoAuditor.cpp.

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

IChronoStatSvc* ChronoAuditor::chronoSvc | ( |  | ) | `[inline]`

Definition at line 33 of file ChronoAuditor.h.

    00033 { return m_chronoSvc; }

## Member Data Documentation

IChronoStatSvc* ChronoAuditor::m_chronoSvc`[private]`

Definition at line 35 of file ChronoAuditor.h.

StringArrayProperty ChronoAuditor::m_types`[private]`

Definition at line 36 of file ChronoAuditor.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiAud/src/ChronoAuditor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiAud/src/ChronoAuditor.cpp