File indexing completed on 2025-09-18 09:33:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGraphTime
0013 #define ROOT_TGraphTime
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TNamed.h"
0025
0026 class TH1;
0027 class TObjArray;
0028 class TTimer;
0029
0030 class TGraphTime : public TNamed {
0031
0032 protected:
0033 Int_t fSleepTime = 0;
0034 Int_t fNsteps = 0;
0035 Double_t fXmin = 0.;
0036 Double_t fXmax = 0.;
0037 Double_t fYmin = 0.;
0038 Double_t fYmax = 0.;
0039 TObjArray *fSteps = nullptr;
0040 TH1 *fFrame = nullptr;
0041 Int_t fAnimateCnt = -1;
0042 TTimer *fAnimateTimer = nullptr;
0043
0044 Bool_t DrawStep(Int_t nstep) const;
0045
0046 public:
0047
0048 TGraphTime();
0049 TGraphTime(Int_t nsteps, Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax);
0050 TGraphTime(const TGraphTime &gr);
0051 ~TGraphTime() override;
0052
0053 virtual Int_t Add(const TObject *obj, Int_t slot, Option_t *option = "");
0054 void Animate(Bool_t enable = kTRUE);
0055 void Draw(Option_t *chopt = "") override;
0056 TObjArray *GetSteps() const { return fSteps; }
0057 Bool_t HandleTimer(TTimer *) override;
0058 void Paint(Option_t *chopt = "") override;
0059 virtual void SaveAnimatedGif(const char *filename = "") const;
0060 virtual void SetSleepTime(Int_t stime = 0) { fSleepTime = stime; }
0061
0062 ClassDefOverride(TGraphTime,1)
0063 };
0064
0065 #endif