GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4RollingGraph Class Reference

Graphs that renew themselves iteratively to monitor a value. More...

#include <TGo4RollingGraph.h>

+ Inheritance diagram for TGo4RollingGraph:

Public Member Functions

 TGo4RollingGraph ()
 Default constructor.
 
 TGo4RollingGraph (Int_t NumPoints, Int_t UpdateInterval=1)
 Constructor with size and update interval.
 
virtual ~TGo4RollingGraph ()
 Destructor.
 
void Clear (Option_t *option="") override
 Clear all points.
 
virtual void Fill (Double_t value, Double_t xerror=-1, Double_t yerror=-1)
 Fills a new value into the rolling graph.
 
Int_t GetNumPoints () const
 Returns number of displayed points.
 
Int_t GetUpdateInterval () const
 Returns interval of entries when a new bin is opened.
 

Protected Member Functions

 ClassDefOverride (TGo4RollingGraph, 1)
 
void NextBin ()
 Create a new bin.
 

Protected Attributes

Double_t fdSum {0}
 Summed total value in the current Bin.
 
Double_t fdSumAveraged {0}
 Averaged summed total value in the current Bin.
 
Long64_t fiCounter {0}
 No. of values filled in total.
 
Int_t fiNumPoints {0}
 Nominal size of the graph, i.e. number of points to display.
 
Int_t fiUpdateInterval {0}
 Number of Fill() functions to call before a new average is started.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TGo4RollingGraph() [1/2]

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.

References fdSum, fdSumAveraged, fiCounter, fiNumPoints, and fiUpdateInterval.

Referenced by ClassDefOverride().

◆ TGo4RollingGraph() [2/2]

TGo4RollingGraph::TGo4RollingGraph ( Int_t NumPoints,
Int_t UpdateInterval = 1 )

Constructor with size and update interval.

Parameters
NumPointsSize of the graph, i.e. number of points
UpdateIntervalNo. 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.

References fdSum, fdSumAveraged, fiCounter, fiNumPoints, and fiUpdateInterval.

◆ ~TGo4RollingGraph()

TGo4RollingGraph::~TGo4RollingGraph ( )
virtual

Destructor.

Definition at line 40 of file TGo4RollingGraph.cxx.

Member Function Documentation

◆ ClassDefOverride()

TGo4RollingGraph::ClassDefOverride ( TGo4RollingGraph ,
1  )
protected

References TGo4RollingGraph().

◆ Clear()

void TGo4RollingGraph::Clear ( Option_t * option = "")
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 106 of file TGo4RollingGraph.cxx.

References fdSum, and fiNumPoints.

◆ Fill()

void TGo4RollingGraph::Fill ( Double_t value,
Double_t xerror = -1,
Double_t yerror = -1 )
virtual

Fills a new value into the rolling graph.

Parameters
valueThe value to fill
xerrorThe X value
yerrorThe Y value

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 51 of file TGo4RollingGraph.cxx.

References fdSum, fdSumAveraged, fiCounter, fiNumPoints, fiUpdateInterval, and NextBin().

◆ GetNumPoints()

Int_t TGo4RollingGraph::GetNumPoints ( ) const
inline

Returns number of displayed points.

Definition at line 35 of file TGo4RollingGraph.h.

References fiNumPoints.

◆ GetUpdateInterval()

Int_t TGo4RollingGraph::GetUpdateInterval ( ) const
inline

Returns interval of entries when a new bin is opened.

Definition at line 36 of file TGo4RollingGraph.h.

References fiUpdateInterval.

◆ NextBin()

void TGo4RollingGraph::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 82 of file TGo4RollingGraph.cxx.

References fiNumPoints.

Referenced by Fill().

Field Documentation

◆ fdSum

Double_t TGo4RollingGraph::fdSum {0}
protected

Summed total value in the current Bin.

Definition at line 44 of file TGo4RollingGraph.h.

Referenced by TGo4RollingGraph(), TGo4RollingGraph(), Clear(), and Fill().

◆ fdSumAveraged

Double_t TGo4RollingGraph::fdSumAveraged {0}
protected

Averaged summed total value in the current Bin.

Definition at line 45 of file TGo4RollingGraph.h.

Referenced by TGo4RollingGraph(), TGo4RollingGraph(), and Fill().

◆ fiCounter

Long64_t TGo4RollingGraph::fiCounter {0}
protected

No. of values filled in total.

Definition at line 43 of file TGo4RollingGraph.h.

Referenced by TGo4RollingGraph(), TGo4RollingGraph(), and Fill().

◆ fiNumPoints

Int_t TGo4RollingGraph::fiNumPoints {0}
protected

Nominal size of the graph, i.e. number of points to display.

Definition at line 41 of file TGo4RollingGraph.h.

Referenced by TGo4RollingGraph(), TGo4RollingGraph(), Clear(), Fill(), GetNumPoints(), and NextBin().

◆ fiUpdateInterval

Int_t TGo4RollingGraph::fiUpdateInterval {0}
protected

Number of Fill() functions to call before a new average is started.

Definition at line 42 of file TGo4RollingGraph.h.

Referenced by TGo4RollingGraph(), TGo4RollingGraph(), Fill(), and GetUpdateInterval().


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