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