GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
Graphs that renew themselves iteratively to monitor a value. More...
#include <TGo4RollingGraph.h>
Public Member Functions | |
TGo4RollingGraph () | |
Default constructor. More... | |
TGo4RollingGraph (Int_t NumPoints, Int_t UpdateInterval=1) | |
Constructor with size and update interval. More... | |
virtual | ~TGo4RollingGraph () |
Destructor. More... | |
virtual void | Fill (Double_t value, Double_t xerror=-1, Double_t yerror=-1) |
Fills a new value into the rolling graph. More... | |
void | Clear (Option_t *option="") override |
Clear all points. More... | |
Int_t | GetNumPoints () const |
Returns number of displayed points. More... | |
Int_t | GetUpdateInterval () const |
Returns interval of entries when a new bin is opened. More... | |
Protected Member Functions | |
void | NextBin () |
Create a new bin. More... | |
ClassDefOverride (TGo4RollingGraph, 1) | |
Protected Attributes | |
Int_t | fiNumPoints {0} |
Nominal size of the graph, i.e. number of points to display. More... | |
Int_t | fiUpdateInterval {0} |
Number of Fill() functions to call before a new average is started. More... | |
Long64_t | fiCounter {0} |
No. of values filled in total. More... | |
Double_t | fdSum {0} |
Summed total value in the current Bin. More... | |
Double_t | fdSumAveraged {0} |
Averaged summed total value in the current Bin. More... | |
Graphs that renew themselves iteratively to monitor a value.
As old points are to be deleted at a certain point, this has the appearance of a rolling counter.
Definition at line 24 of file TGo4RollingGraph.h.
TGo4RollingGraph::TGo4RollingGraph | ( | ) |
Default constructor.
Creates a rolling graph with an update interval of 1, i.e. no averaging of the input values Graph will have no size, either. Without setting size, nothing will be drawn!
Definition at line 23 of file TGo4RollingGraph.cxx.
TGo4RollingGraph::TGo4RollingGraph | ( | Int_t | NumPoints, |
Int_t | UpdateInterval = 1 |
||
) |
Constructor with size and update interval.
NumPoints | Size of the graph, i.e. number of points |
UpdateInterval | No. of calls to the Fill() routine after which a new bin will started to be filled. For UpdateInterval=1 every value will be displayed directly on the rolling graph, for values > 1 an average will be shown |
Definition at line 33 of file TGo4RollingGraph.cxx.
|
virtual |
Destructor.
Definition at line 40 of file TGo4RollingGraph.cxx.
|
protected |
|
override |
Clear all points.
Remove all points from the graph, set number of points to zero, and reset internal value for averaging
Definition at line 104 of file TGo4RollingGraph.cxx.
References ClassImp(), fdSum, and fiNumPoints.
|
virtual |
Fills a new value into the rolling graph.
value | The value to fill |
If the Update Interval is larger than one, the value will not be displayed directly in the graph but added to the averaging
Definition at line 49 of file TGo4RollingGraph.cxx.
References fdSum, fdSumAveraged, fiCounter, fiNumPoints, fiUpdateInterval, and NextBin().
Referenced by TXXXUnpackProc::BuildEvent().
|
inline |
Returns number of displayed points.
Definition at line 35 of file TGo4RollingGraph.h.
References fiNumPoints.
|
inline |
Returns interval of entries when a new bin is opened.
Definition at line 36 of file TGo4RollingGraph.h.
References fiUpdateInterval, and NextBin().
|
protected |
Create a new bin.
Internal function that implements the "rolling" of the graph: The first bin is deleted while a new one is appended at the end
Definition at line 80 of file TGo4RollingGraph.cxx.
References fiNumPoints.
Referenced by Fill(), and GetUpdateInterval().
|
protected |
Summed total value in the current Bin.
Definition at line 44 of file TGo4RollingGraph.h.
|
protected |
Averaged summed total value in the current Bin.
Definition at line 45 of file TGo4RollingGraph.h.
Referenced by Fill().
|
protected |
No. of values filled in total.
Definition at line 43 of file TGo4RollingGraph.h.
Referenced by Fill().
|
protected |
Nominal size of the graph, i.e. number of points to display.
Definition at line 41 of file TGo4RollingGraph.h.
Referenced by Clear(), Fill(), GetNumPoints(), and NextBin().
|
protected |
Number of Fill() functions to call before a new average is started.
Definition at line 42 of file TGo4RollingGraph.h.
Referenced by Fill(), and GetUpdateInterval().