Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4Ratemeter Class Reference

Class containing event counter and ratemeter services. More...

#include <TGo4Ratemeter.h>

List of all members.

Public Methods

 TGo4Ratemeter ()
virtual ~TGo4Ratemeter ()
Double_t GetRate ()
Double_t GetAvRate ()
Double_t GetTime ()
UInt_t GetCurrentCount ()
void Update (Int_t increment=1)
 Update counter and rate values. More...

void Reset ()
 Update counter and rate values. More...

Bool_t TestUpdate ()
 Test if update has been called since last test.. More...


Static Public Attributes

const Double_t fgdUPDATEINTERVAL = 1.0

Private Attributes

UInt_t fuCurrentCount
 Number of events processed since last start. More...

UInt_t fuLastCount
 Number of events processed at last ratemeter update. More...

Double_t fdRate
 Current eventrate (events/sec). More...

Double_t fdAveRate
 Average eventrate since last reset (events/sec). More...

Double_t fdTime
 Time sum since last ratemeter reset. More...

Double_t fdLastTime
 Time sum at last ratemeter update. More...

Double_t fdDeltaTime
 Time interval since last Rate Calculation. More...

TStopwatch * fxClock
Bool_t fbUpdateDone
 True if update has been performed since last TestZero call. More...


Detailed Description

Class containing event counter and ratemeter services.

Definition at line 26 of file TGo4Ratemeter.h.


Constructor & Destructor Documentation

TGo4Ratemeter::TGo4Ratemeter  
 

Definition at line 23 of file TGo4Ratemeter.cxx.

References fxClock.

TGo4Ratemeter::~TGo4Ratemeter   [virtual]
 

Definition at line 30 of file TGo4Ratemeter.cxx.

References fxClock.


Member Function Documentation

Double_t TGo4Ratemeter::GetRate   [inline]
 

Definition at line 33 of file TGo4Ratemeter.h.

References fdRate.

Referenced by TGo4AnalysisClient::UpdateStatus().

Double_t TGo4Ratemeter::GetAvRate   [inline]
 

Definition at line 35 of file TGo4Ratemeter.h.

References fdAveRate.

Referenced by TGo4AnalysisClient::UpdateStatus().

Double_t TGo4Ratemeter::GetTime   [inline]
 

Definition at line 37 of file TGo4Ratemeter.h.

References fdTime.

Referenced by TGo4AnalysisClient::UpdateStatus().

UInt_t TGo4Ratemeter::GetCurrentCount   [inline]
 

Definition at line 39 of file TGo4Ratemeter.h.

References fuCurrentCount.

Referenced by TGo4AnalysisClient::GetCurrentCount(), and TGo4AnalysisClient::UpdateStatus().

void TGo4Ratemeter::Update Int_t    increment = 1
 

Update counter and rate values.

Parameter increment may specify the number of counts to add before the new rate is calculated.

Definition at line 48 of file TGo4Ratemeter.cxx.

References fbUpdateDone, fdAveRate, fdDeltaTime, fdLastTime, fdRate, fdTime, fgdUPDATEINTERVAL, fuCurrentCount, fuLastCount, and fxClock.

Referenced by TGo4AnalysisClient::UpdateRate().

void TGo4Ratemeter::Reset  
 

Update counter and rate values.

Parameter increment may specify the number of counts to add before the new rate is calculated.

Definition at line 35 of file TGo4Ratemeter.cxx.

References fdAveRate, fdDeltaTime, fdLastTime, fdRate, fdTime, fuCurrentCount, fuLastCount, and fxClock.

Referenced by TGo4AnalysisClient::RestartMain(), and TGo4AnalysisClient::Start().

Bool_t TGo4Ratemeter::TestUpdate  
 

Test if update has been called since last test..

To be called from watch thread to check if main thread is still active. If not, watch thread has to update status and rate itself.

Definition at line 88 of file TGo4Ratemeter.cxx.

References fbUpdateDone.

Referenced by TGo4AnalysisClient::TestRatemeter().


Member Data Documentation

const Double_t TGo4Ratemeter::fgdUPDATEINTERVAL = 1.0 [static]
 

Definition at line 20 of file TGo4Ratemeter.cxx.

Referenced by Update().

UInt_t TGo4Ratemeter::fuCurrentCount [private]
 

Number of events processed since last start.

Definition at line 57 of file TGo4Ratemeter.h.

Referenced by GetCurrentCount(), Reset(), and Update().

UInt_t TGo4Ratemeter::fuLastCount [private]
 

Number of events processed at last ratemeter update.

Definition at line 60 of file TGo4Ratemeter.h.

Referenced by Reset(), and Update().

Double_t TGo4Ratemeter::fdRate [private]
 

Current eventrate (events/sec).

Definition at line 63 of file TGo4Ratemeter.h.

Referenced by GetRate(), Reset(), and Update().

Double_t TGo4Ratemeter::fdAveRate [private]
 

Average eventrate since last reset (events/sec).

Definition at line 66 of file TGo4Ratemeter.h.

Referenced by GetAvRate(), Reset(), and Update().

Double_t TGo4Ratemeter::fdTime [private]
 

Time sum since last ratemeter reset.

in s.

Definition at line 69 of file TGo4Ratemeter.h.

Referenced by GetTime(), Reset(), and Update().

Double_t TGo4Ratemeter::fdLastTime [private]
 

Time sum at last ratemeter update.

in s.

Definition at line 72 of file TGo4Ratemeter.h.

Referenced by Reset(), and Update().

Double_t TGo4Ratemeter::fdDeltaTime [private]
 

Time interval since last Rate Calculation.

In s.

Definition at line 75 of file TGo4Ratemeter.h.

Referenced by Reset(), and Update().

TStopwatch* TGo4Ratemeter::fxClock [private]
 

Definition at line 77 of file TGo4Ratemeter.h.

Referenced by Reset(), TGo4Ratemeter(), Update(), and ~TGo4Ratemeter().

Bool_t TGo4Ratemeter::fbUpdateDone [private]
 

True if update has been performed since last TestZero call.

Definition at line 80 of file TGo4Ratemeter.h.

Referenced by TestUpdate(), and Update().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:52 2005 for Go4-v2.10-5 by doxygen1.2.15