GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Class containing event counter and ratemeter services. More...
#include <TGo4Ratemeter.h>
Public Member Functions | |
TGo4Ratemeter () | |
virtual | ~TGo4Ratemeter () |
Double_t | GetAvRate () const |
ULong64_t | GetCurrentCount () const |
const char * | GetCurrentSource () const |
const char * | GetDateTime () const |
Double_t | GetRate () const |
Double_t | GetTime () const |
Bool_t | IsRunning () const |
void | Reset () |
Reset counter and rate values. | |
void | SetCurrentSource (const char *str) |
void | SetDateTime (const char *str) |
void | SetRunning (Bool_t on=kTRUE) |
void | SetUpdateInterval (double v) |
Set update interval in seconds - default is 1. | |
Bool_t | TestUpdate () |
Test if update has been called since last test. | |
Bool_t | Update (Int_t increment=1) |
Update counter and rate values. | |
void | UpdateFrom (const TGo4Ratemeter *r) |
Private Attributes | |
Bool_t | fbRunning {kFALSE} |
Bool_t | fbUpdateDone {kFALSE} |
Time when last rate measurement was done. | |
Double_t | fdRate {0} |
Double_t | fdTime {0} |
Double_t | fdUpdateInterval {0} |
How often time should be checked. | |
TTimeStamp | fLastTm |
Number of events processed at last ratemeter update. | |
ULong64_t | fuCheckInterval {0} |
Next counter value when time will be checked. | |
ULong64_t | fuCurrentCount {0} |
ULong64_t | fuLastCount {0} |
ULong64_t | fuNextCheckCnt {0} |
True if update has been performed since last TestZero call. | |
TString | fxDateString |
TString | fxEventSource |
Static Private Attributes | |
static const Double_t | fgdUPDATEINTERVAL = 1.0 |
Configured interval in seconds before two updates. | |
Class containing event counter and ratemeter services.
Definition at line 24 of file TGo4Ratemeter.h.
TGo4Ratemeter::TGo4Ratemeter | ( | ) |
Definition at line 19 of file TGo4Ratemeter.cxx.
References fbRunning, fbUpdateDone, fdRate, fdTime, fdUpdateInterval, fgdUPDATEINTERVAL, fLastTm, fuCheckInterval, fuCurrentCount, fuLastCount, fuNextCheckCnt, fxDateString, and fxEventSource.
Referenced by UpdateFrom().
|
virtual |
Definition at line 36 of file TGo4Ratemeter.cxx.
|
inline |
Definition at line 56 of file TGo4Ratemeter.h.
References fdTime, and fuCurrentCount.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
|
inline |
Definition at line 54 of file TGo4Ratemeter.h.
References fuCurrentCount.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
|
inline |
Definition at line 60 of file TGo4Ratemeter.h.
References fxEventSource.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
|
inline |
Definition at line 58 of file TGo4Ratemeter.h.
References fxDateString.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
|
inline |
Definition at line 50 of file TGo4Ratemeter.h.
References fdRate.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated(), and TGo4Sniffer::RatemeterUpdate().
|
inline |
Definition at line 52 of file TGo4Ratemeter.h.
References fdTime.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
|
inline |
Definition at line 48 of file TGo4Ratemeter.h.
References fbRunning.
Referenced by TGo4AnalysisStatusMonitor::linkedObjectUpdated().
void TGo4Ratemeter::Reset | ( | ) |
Reset counter and rate values.
Definition at line 53 of file TGo4Ratemeter.cxx.
References fbRunning, fbUpdateDone, fdRate, fdTime, fLastTm, fuCheckInterval, fuCurrentCount, fuLastCount, and fuNextCheckCnt.
|
inline |
Definition at line 71 of file TGo4Ratemeter.h.
References fxEventSource.
|
inline |
Definition at line 70 of file TGo4Ratemeter.h.
References fxDateString.
|
inline |
Definition at line 69 of file TGo4Ratemeter.h.
References fbRunning.
|
inline |
Set update interval in seconds - default is 1.
Definition at line 82 of file TGo4Ratemeter.h.
References fdUpdateInterval.
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 112 of file TGo4Ratemeter.cxx.
References fbUpdateDone.
Bool_t 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. Return kTRUE if new rate is calculated
Definition at line 67 of file TGo4Ratemeter.cxx.
References fbRunning, fbUpdateDone, fdRate, fdTime, fdUpdateInterval, fLastTm, fuCheckInterval, fuCurrentCount, fuLastCount, and fuNextCheckCnt.
void TGo4Ratemeter::UpdateFrom | ( | const TGo4Ratemeter * | r | ) |
Definition at line 40 of file TGo4Ratemeter.cxx.
References TGo4Ratemeter(), fbRunning, fdRate, fdTime, fuCurrentCount, fxDateString, and fxEventSource.
|
private |
Definition at line 26 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), IsRunning(), Reset(), SetRunning(), Update(), and UpdateFrom().
|
private |
Time when last rate measurement was done.
Definition at line 35 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), Reset(), TestUpdate(), and Update().
|
private |
Definition at line 28 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), GetRate(), Reset(), Update(), and UpdateFrom().
|
private |
Definition at line 29 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), GetAvRate(), GetTime(), Reset(), Update(), and UpdateFrom().
|
private |
How often time should be checked.
Definition at line 39 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), SetUpdateInterval(), and Update().
|
staticprivate |
Configured interval in seconds before two updates.
Definition at line 41 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter().
|
private |
Number of events processed at last ratemeter update.
Definition at line 34 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), Reset(), and Update().
|
private |
Next counter value when time will be checked.
Definition at line 38 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), Reset(), and Update().
|
private |
Definition at line 27 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), GetAvRate(), GetCurrentCount(), Reset(), Update(), and UpdateFrom().
|
private |
Definition at line 33 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), Reset(), and Update().
|
private |
True if update has been performed since last TestZero call.
Definition at line 37 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), Reset(), and Update().
|
private |
Definition at line 30 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), GetDateTime(), SetDateTime(), and UpdateFrom().
|
private |
Definition at line 31 of file TGo4Ratemeter.h.
Referenced by TGo4Ratemeter(), GetCurrentSource(), SetCurrentSource(), and UpdateFrom().