ROOT  6.06/09
Reference Guide
TGraphTime.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 13/07/2009
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGraphTime
13 #define ROOT_TGraphTime
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraphTime //
19 // //
20 // An array of objects evolving with time //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TNamed
25 #include "TNamed.h"
26 #endif
27 
28 class TH1;
29 class TObjArray;
30 
31 class TGraphTime : public TNamed {
32 
33 protected:
34 
35  Int_t fSleepTime; //Time (msec) to wait between time steps
36  Int_t fNsteps; //Number of time steps
37  Double_t fXmin; //Minimum for X axis
38  Double_t fXmax; //Maximum for X axis
39  Double_t fYmin; //Minimum for Y axis
40  Double_t fYmax; //Maximum for Y axis
41  TObjArray *fSteps; //array of TLists for each time step
42  TH1 *fFrame; //TH1 object used for the pad range
43 
44 public:
45 
46  TGraphTime();
48  TGraphTime(const TGraphTime &gr);
49  virtual ~TGraphTime();
50 
51  virtual Int_t Add(const TObject *obj, Int_t slot, Option_t *option="");
52  virtual void Draw(Option_t *chopt="");
53  TObjArray *GetSteps() const {return fSteps;}
54  virtual void Paint(Option_t *chopt="");
55  virtual void SaveAnimatedGif(const char *filename="") const;
56  virtual void SetSleepTime(Int_t stime=0) {fSleepTime = stime;}
57 
58  ClassDef(TGraphTime,1) //An array of objects evolving with time
59 };
60 
61 #endif
TGraphTime is used to draw a set of objects evolving with nsteps in time between tmin and tmax...
Definition: TGraphTime.h:31
An array of TObjects.
Definition: TObjArray.h:39
float xmin
Definition: THbookFile.cxx:93
Double_t fYmin
Definition: TGraphTime.h:39
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
TH1 * fFrame
Definition: TGraphTime.h:42
static const char * filename()
int Int_t
Definition: RtypesCore.h:41
virtual void SaveAnimatedGif(const char *filename="") const
Save this object to filename as an animated gif file if filename is specified it must be of the form ...
Definition: TGraphTime.cxx:174
Int_t fSleepTime
Definition: TGraphTime.h:35
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Paint(Option_t *chopt="")
Paint all objects added to each time step.
Definition: TGraphTime.cxx:143
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
TObjArray * GetSteps() const
Definition: TGraphTime.h:53
Int_t fNsteps
Definition: TGraphTime.h:36
float ymax
Definition: THbookFile.cxx:93
TObjArray * fSteps
Definition: TGraphTime.h:41
float xmax
Definition: THbookFile.cxx:93
TGraphErrors * gr
Definition: legend1.C:25
Double_t fXmax
Definition: TGraphTime.h:38
virtual void Draw(Option_t *chopt="")
Draw this TGraphTime.
Definition: TGraphTime.cxx:124
virtual void SetSleepTime(Int_t stime=0)
Definition: TGraphTime.h:56
double Double_t
Definition: RtypesCore.h:55
The TH1 histogram class.
Definition: TH1.h:80
Double_t fYmax
Definition: TGraphTime.h:40
Mother of all ROOT objects.
Definition: TObject.h:58
virtual ~TGraphTime()
GraphTime default destructor.
Definition: TGraphTime.cxx:72
Double_t fXmin
Definition: TGraphTime.h:37
virtual Int_t Add(const TObject *obj, Int_t slot, Option_t *option="")
Add one object to a time slot.
Definition: TGraphTime.cxx:103
TObject * obj