All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Chrono Class Reference

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

#include <GaudiKernel/Chrono.h>

Collaboration diagram for Chrono:

Public Member Functions

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

Private Member Functions

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

Private Attributes

ChronoEntitym_chrono
 The actual chronometer. More...
 

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.

55  : m_chrono ( 0 )
56  { if ( 0 != svc ) { m_chrono = svc -> chronoStart ( tag ) ; } }
ChronoEntity * m_chrono
The actual chronometer.
Definition: Chrono.h:143
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.

82  : m_chrono ( 0 )
83  { if ( 0 != svc ) { m_chrono = svc -> chronoStart ( tag ) ; } }
ChronoEntity * m_chrono
The actual chronometer.
Definition: Chrono.h:143
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.

105  : m_chrono ( c )
106  { if ( 0 != m_chrono ) { m_chrono -> start () ; } }
ChronoEntity * m_chrono
The actual chronometer.
Definition: Chrono.h:143
tuple start
Definition: IOTest.py:88
Chrono::Chrono ( ChronoEntity c)
inline

Constructor from Chrono Object/Entity.

{ // 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.

128 : m_chrono ( &c ) { m_chrono -> start () ; }
ChronoEntity * m_chrono
The actual chronometer.
Definition: Chrono.h:143
tuple start
Definition: IOTest.py:88
Chrono::~Chrono ( )
inline

Destructor , stop the chrono.

Definition at line 131 of file Chrono.h.

131 { if ( 0 != m_chrono ) { m_chrono->stop() ; } }
ChronoEntity * m_chrono
The actual chronometer.
Definition: Chrono.h:143
IChronoSvc::ChronoStatus stop()
stop the chrono
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

ChronoEntity* Chrono::m_chrono
private

The actual chronometer.

Definition at line 143 of file Chrono.h.


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