EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stopwatch Class Reference

#include <EicRoot/blob/master/rich/standalone/algorithm/Stopwatch.h>

Public Member Functions

 Stopwatch ()
 
void Start (int reset=1)
 
void Stop ()
 
void Continue ()
 
int Counter () const
 
double RealTime ()
 
void Reset ()
 
void ResetCpuTime (double time=0)
 
void ResetRealTime (double time=0)
 
double CpuTime ()
 

Private Types

enum  EState { kUndefined, kStopped, kRunning }
 

Static Private Member Functions

static double GetRealTime ()
 
static double GetCPUTime ()
 

Private Attributes

double fStartRealTime
 
double fStopRealTime
 
double fStartCpuTime
 
double fStopCpuTime
 
double fTotalCpuTime
 
double fTotalRealTime
 
EState fState
 
int fCounter
 

Detailed Description

Definition at line 26 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 26 of file Stopwatch.h

Member Enumeration Documentation

enum Stopwatch::EState
private
Enumerator:
kUndefined 
kStopped 
kRunning 

Definition at line 29 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 29 of file Stopwatch.h

Constructor & Destructor Documentation

Stopwatch::Stopwatch ( )
inline

Definition at line 85 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 85 of file Stopwatch.h

References gTicks, and Start().

+ Here is the call graph for this function:

Member Function Documentation

void Stopwatch::Continue ( )
inline

Definition at line 142 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 142 of file Stopwatch.h

References fStartCpuTime, fStartRealTime, fState, fStopCpuTime, fStopRealTime, fTotalCpuTime, fTotalRealTime, kRunning, kStopped, and kUndefined.

int Stopwatch::Counter ( ) const
inline

Definition at line 48 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 48 of file Stopwatch.h

References fCounter.

double Stopwatch::CpuTime ( )
inline

Definition at line 176 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 176 of file Stopwatch.h

References fState, fTotalCpuTime, kRunning, kUndefined, and Stop().

+ Here is the call graph for this function:

double Stopwatch::GetCPUTime ( )
inlinestaticprivate

Definition at line 208 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 208 of file Stopwatch.h

References GetRealTime(), gTicks, and TRUE.

Referenced by Start(), and Stop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Stopwatch::GetRealTime ( )
inlinestaticprivate

Definition at line 192 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 192 of file Stopwatch.h

References Acts::UnitConstants::e.

Referenced by GetCPUTime(), Start(), and Stop().

+ Here is the caller graph for this function:

double Stopwatch::RealTime ( )
inline

Definition at line 160 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 160 of file Stopwatch.h

References fState, fTotalRealTime, kRunning, kUndefined, and Stop().

+ Here is the call graph for this function:

void Stopwatch::Reset ( )
inline

Definition at line 50 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 50 of file Stopwatch.h

References ResetCpuTime(), and ResetRealTime().

+ Here is the call graph for this function:

void Stopwatch::ResetCpuTime ( double  time = 0)
inline

Definition at line 51 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 51 of file Stopwatch.h

References fTotalCpuTime, Stop(), and Acts::Test::time.

Referenced by Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Stopwatch::ResetRealTime ( double  time = 0)
inline

Definition at line 52 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 52 of file Stopwatch.h

References fTotalRealTime, Stop(), and Acts::Test::time.

Referenced by Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Stopwatch::Start ( int  reset = 1)
inline

Definition at line 105 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 105 of file Stopwatch.h

References fCounter, fStartCpuTime, fStartRealTime, fState, fTotalCpuTime, fTotalRealTime, GetCPUTime(), GetRealTime(), kRunning, and kUndefined.

Referenced by Stopwatch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Stopwatch::Stop ( )
inline

Definition at line 127 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 127 of file Stopwatch.h

References fStartCpuTime, fStartRealTime, fState, fStopCpuTime, fStopRealTime, fTotalCpuTime, fTotalRealTime, GetCPUTime(), GetRealTime(), kRunning, and kStopped.

Referenced by CpuTime(), RealTime(), ResetCpuTime(), and ResetRealTime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int Stopwatch::fCounter
private

Definition at line 38 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 38 of file Stopwatch.h

Referenced by Counter(), and Start().

double Stopwatch::fStartCpuTime
private

Definition at line 33 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 33 of file Stopwatch.h

Referenced by Continue(), Start(), and Stop().

double Stopwatch::fStartRealTime
private

Definition at line 31 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 31 of file Stopwatch.h

Referenced by Continue(), Start(), and Stop().

EState Stopwatch::fState
private

Definition at line 37 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 37 of file Stopwatch.h

Referenced by Continue(), CpuTime(), RealTime(), Start(), and Stop().

double Stopwatch::fStopCpuTime
private

Definition at line 34 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 34 of file Stopwatch.h

Referenced by Continue(), and Stop().

double Stopwatch::fStopRealTime
private

Definition at line 32 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 32 of file Stopwatch.h

Referenced by Continue(), and Stop().

double Stopwatch::fTotalCpuTime
private

Definition at line 35 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 35 of file Stopwatch.h

Referenced by Continue(), CpuTime(), ResetCpuTime(), Start(), and Stop().

double Stopwatch::fTotalRealTime
private

Definition at line 36 of file Stopwatch.h.

View newest version in sPHENIX GitHub at line 36 of file Stopwatch.h

Referenced by Continue(), RealTime(), ResetRealTime(), Start(), and Stop().


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