Logo ROOT  
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#include "TNamed.h"
25
26class TH1;
27class TObjArray;
28
29class TGraphTime : public TNamed {
30
31protected:
32
33 Int_t fSleepTime; ///< Time (msec) to wait between time steps
34 Int_t fNsteps; ///< Number of time steps
35 Double_t fXmin; ///< Minimum for X axis
36 Double_t fXmax; ///< Maximum for X axis
37 Double_t fYmin; ///< Minimum for Y axis
38 Double_t fYmax; ///< Maximum for Y axis
39 TObjArray *fSteps; ///< Array of TLists for each time step
40 TH1 *fFrame; ///< TH1 object used for the pad range
41
42public:
43
44 TGraphTime();
46 TGraphTime(const TGraphTime &gr);
47 virtual ~TGraphTime();
48
49 virtual Int_t Add(const TObject *obj, Int_t slot, Option_t *option="");
50 virtual void Draw(Option_t *chopt="");
51 TObjArray *GetSteps() const {return fSteps;}
52 virtual void Paint(Option_t *chopt="");
53 virtual void SaveAnimatedGif(const char *filename="") const;
54 virtual void SetSleepTime(Int_t stime=0) {fSleepTime = stime;}
55
56 ClassDef(TGraphTime,1) //An array of objects evolving with time
57};
58
59#endif
int Int_t
Definition: RtypesCore.h:45
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
float xmin
Definition: THbookFile.cxx:95
float ymin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
float ymax
Definition: THbookFile.cxx:95
TGraphTime is used to draw a set of objects evolving with nsteps in time between tmin and tmax.
Definition: TGraphTime.h:29
virtual void Paint(Option_t *chopt="")
Paint all objects added to each time step.
Definition: TGraphTime.cxx:143
virtual Int_t Add(const TObject *obj, Int_t slot, Option_t *option="")
Add one object to a time slot.
Definition: TGraphTime.cxx:103
Double_t fXmin
Minimum for X axis.
Definition: TGraphTime.h:35
Int_t fSleepTime
Time (msec) to wait between time steps.
Definition: TGraphTime.h:33
virtual void SetSleepTime(Int_t stime=0)
Definition: TGraphTime.h:54
TH1 * fFrame
TH1 object used for the pad range.
Definition: TGraphTime.h:40
Double_t fYmin
Minimum for Y axis.
Definition: TGraphTime.h:37
TObjArray * GetSteps() const
Definition: TGraphTime.h:51
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
Double_t fXmax
Maximum for X axis.
Definition: TGraphTime.h:36
virtual ~TGraphTime()
GraphTime default destructor.
Definition: TGraphTime.cxx:72
TGraphTime()
default constructor.
Definition: TGraphTime.cxx:32
Double_t fYmax
Maximum for Y axis.
Definition: TGraphTime.h:38
TObjArray * fSteps
Array of TLists for each time step.
Definition: TGraphTime.h:39
Int_t fNsteps
Number of time steps.
Definition: TGraphTime.h:34
virtual void Draw(Option_t *chopt="")
Draw this TGraphTime.
Definition: TGraphTime.cxx:124
TH1 is the base class of all histogram classes in ROOT.
Definition: TH1.h:58
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
TGraphErrors * gr
Definition: legend1.C:25