GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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. 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...
 
virtual void Clear (Option_t *option="")
 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...
 
 ClassDef (TGo4RollingGraph, 1)
 

Protected Attributes

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

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::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.

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.

TGo4RollingGraph::~TGo4RollingGraph ( )
virtual

Destructor.

Definition at line 40 of file TGo4RollingGraph.cxx.

Member Function Documentation

TGo4RollingGraph::ClassDef ( TGo4RollingGraph  ,
 
)
protected
void TGo4RollingGraph::Clear ( Option_t *  option = "")
virtual

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 fdSum, and fiNumPoints.

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

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().

Int_t TGo4RollingGraph::GetNumPoints ( ) const
inline

Returns number of displayed points.

Definition at line 35 of file TGo4RollingGraph.h.

References fiNumPoints.

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.

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

References fiNumPoints.

Referenced by Fill().

Member Data Documentation

Double_t TGo4RollingGraph::fdSum
protected

Summed total value in the current Bin.

Definition at line 44 of file TGo4RollingGraph.h.

Referenced by Clear(), and Fill().

Double_t TGo4RollingGraph::fdSumAveraged
protected

Averaged summed total value in the current Bin.

Definition at line 45 of file TGo4RollingGraph.h.

Referenced by Fill().

Long64_t TGo4RollingGraph::fiCounter
protected

No. of values filled in total.

Definition at line 43 of file TGo4RollingGraph.h.

Referenced by Fill().

Int_t TGo4RollingGraph::fiNumPoints
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().

Int_t TGo4RollingGraph::fiUpdateInterval
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().


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