GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4RollingGraph.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 
15 #ifndef TGO4ROLLINGGRAPH_H
16 #define TGO4ROLLINGGRAPH_H
17 
18 #include "TGraphErrors.h"
19 
24 class TGo4RollingGraph : public TGraphErrors
25 {
26  public :
28  TGo4RollingGraph(Int_t NumPoints, Int_t UpdateInterval = 1);
29 
30  virtual ~TGo4RollingGraph();
31 
32  virtual void Fill (Double_t value, Double_t xerror=-1, Double_t yerror=-1);
33  void Clear (Option_t *option = "") override;
34 
35  Int_t GetNumPoints() const { return fiNumPoints; }
36  Int_t GetUpdateInterval() const { return fiUpdateInterval; }
37 
38  protected :
39  void NextBin ();
40 
41  Int_t fiNumPoints{0};
42  Int_t fiUpdateInterval{0};
43  Long64_t fiCounter{0};
44  Double_t fdSum{0};
45  Double_t fdSumAveraged{0};
46 
48 };
49 
50 #endif
51 
Int_t fiNumPoints
Nominal size of the graph, i.e. number of points to display.
void Clear(Option_t *option="") override
Clear all points.
Graphs that renew themselves iteratively to monitor a value.
virtual void Fill(Double_t value, Double_t xerror=-1, Double_t yerror=-1)
Fills a new value into the rolling graph.
Int_t fiUpdateInterval
Number of Fill() functions to call before a new average is started.
void NextBin()
Create a new bin.
Int_t GetNumPoints() const
Returns number of displayed points.
ClassDefOverride(TGo4RollingGraph, 1)
Long64_t fiCounter
No. of values filled in total.
Int_t GetUpdateInterval() const
Returns interval of entries when a new bin is opened.
virtual ~TGo4RollingGraph()
Destructor.
Double_t fdSum
Summed total value in the current Bin.
TGo4RollingGraph()
Default constructor.
Double_t fdSumAveraged
Averaged summed total value in the current Bin.