GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4RollingGraph.h
Go to the documentation of this file.
1 // $Id: TGo4RollingGraph.h 2627 2019-10-01 08:02:45Z linev $
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  virtual void Clear (Option_t *option = "");
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;
43  Long64_t fiCounter;
44  Double_t fdSum;
45  Double_t fdSumAveraged;
46 
48 };
49 
50 #endif
51 
Int_t fiNumPoints
Nominal size of the graph, i.e. number of points to display.
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 GetUpdateInterval() const
Returns interval of entries when a new bin is opened.
ClassDef(TGo4RollingGraph, 1)
Long64_t fiCounter
No. of values filled in total.
virtual ~TGo4RollingGraph()
Destructor.
Double_t fdSum
Summed total value in the current Bin.
TGo4RollingGraph()
Default constructor.
virtual void Clear(Option_t *option="")
Clear all points.
Double_t fdSumAveraged
Averaged summed total value in the current Bin.
Int_t GetNumPoints() const
Returns number of displayed points.