Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Public Member Functions | Private Member Functions | Private Attributes

Chrono Class Reference

A small utility class for chronometry of user codes. More...

#include <Chrono.h>

Collaboration diagram for Chrono:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Chrono (IChronoSvc *svc=0, const std::string &tag="CHRONO::UNNAMED")
 Constructor from Chrono Service and the tag.
 Chrono (const std::string &tag, IChronoSvc *svc)
 Constructor from Chrono Service and the tag.
 Chrono (ChronoEntity *c)
 Constructor from Chrono Object/Entity.
 Chrono (ChronoEntity &c)
 Constructor from Chrono Object/Entity.
 ~Chrono ()
 Destructor , stop the chrono.

Private Member Functions

 Chrono (const Chrono &)
 the copy constructor is disabled
Chronooperator= (const Chrono &)
 the assignment operator is disabled

Private Attributes

ChronoEntitym_chrono
 The actual chronometer.

Detailed Description

A small utility class for chronometry of user codes.

See also:
ChronoEntity
IChronoSvc
Author:
Vanya Belyaev
Date:
Nov 26, 1999

Definition at line 27 of file Chrono.h.


Constructor & Destructor Documentation

Chrono::Chrono ( IChronoSvc svc = 0,
const std::string tag = "CHRONO::UNNAMED" 
) [inline]

Constructor from Chrono Service and the tag.

  IChronoSvc* svc = ... ;

  { // start the scope
    Chrono chrono ( svc , "some unique tag here" ) ;

    for ( long i = 0 ; i < 10000000 ; ++i )
     {
        .. put some CPU-intensive computations here
     }

  } // end of the scope, destroy chrono
Parameters:
svcpointer to Chrono Service
tagthe unique tag

Definition at line 53 of file Chrono.h.

    : m_chrono ( 0 )
  { if ( 0 != svc ) { m_chrono = svc -> chronoStart ( tag ) ; } }
Chrono::Chrono ( const std::string tag,
IChronoSvc svc 
) [inline]

Constructor from Chrono Service and the tag.

  IChronoSvc* svc = ... ;

  { // start the scope
    Chrono chrono ( "some unique tag here" , svc ) ;

    for ( long i = 0 ; i < 10000000 ; ++i )
     {
        .. put some CPU-intensive computations here
     }

  } // end of the scope, destroy chrono
Parameters:
tagthe unique tag
svcpointer to Chrono Service

Definition at line 80 of file Chrono.h.

    : m_chrono ( 0 )
  { if ( 0 != svc ) { m_chrono = svc -> chronoStart ( tag ) ; } }
Chrono::Chrono ( ChronoEntity c ) [inline]

Constructor from Chrono Object/Entity.

  ChronoEntity* chronometer = ... ;

  { // start the scope
    Chrono chrono ( chronometer ) ;

    for ( long i = 0 ; i < 10000000 ; ++i )
     {
        .. put some CPU-intensive computations here
     }

  } // end of the scope, destroy chrono
Parameters:
cthe pointer to Chrono Object/Entity

Definition at line 105 of file Chrono.h.

                             : m_chrono ( c )
  { if ( 0 != m_chrono ) { m_chrono -> start () ; } }
Chrono::Chrono ( ChronoEntity c ) [inline]

Constructor from Chrono Object/Entity.

  ChronoEntity m_chrono = ... ;

  { // start the scope
    Chrono chrono ( m_chrono ) ;

    for ( long i = 0 ; i < 10000000 ; ++i )
     {
        .. put some CPU-intensive computations here
     }

  } // end of the scope, destroy chrono
Parameters:
cthe reference to Chrono Object/Entity

Definition at line 128 of file Chrono.h.

: m_chrono ( &c ) { m_chrono -> start () ; }
Chrono::~Chrono (  ) [inline]

Destructor , stop the chrono.

Definition at line 131 of file Chrono.h.

{ if ( 0 != m_chrono ) { m_chrono->stop() ; } }
Chrono::Chrono ( const Chrono  ) [private]

the copy constructor is disabled


Member Function Documentation

Chrono& Chrono::operator= ( const Chrono  ) [private]

the assignment operator is disabled


Member Data Documentation

The actual chronometer.

Definition at line 143 of file Chrono.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:34 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004