Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:04

0001 // @(#)root/hist:$Id$
0002 // Author: Rene Brun 13/07/2009
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGraphTime
0013 #define ROOT_TGraphTime
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TGraphTime                                                           //
0019 //                                                                      //
0020 // An array of objects evolving with time                               //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TNamed.h"
0025 
0026 class TH1;
0027 class TObjArray;
0028 
0029 class TGraphTime : public TNamed {
0030 
0031 protected:
0032 
0033    Int_t              fSleepTime; ///< Time (msec) to wait between time steps
0034    Int_t              fNsteps;    ///< Number of time steps
0035    Double_t           fXmin;      ///< Minimum for X axis
0036    Double_t           fXmax;      ///< Maximum for X axis
0037    Double_t           fYmin;      ///< Minimum for Y axis
0038    Double_t           fYmax;      ///< Maximum for Y axis
0039    TObjArray         *fSteps;     ///< Array of TLists for each time step
0040    TH1               *fFrame;     ///< TH1 object used for the pad range
0041 
0042 public:
0043 
0044    TGraphTime();
0045    TGraphTime(Int_t nsteps, Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax);
0046    TGraphTime(const TGraphTime &gr);
0047    ~TGraphTime() override;
0048 
0049    virtual Int_t   Add(const TObject *obj, Int_t slot, Option_t *option="");
0050    void    Draw(Option_t *chopt="") override;
0051    TObjArray      *GetSteps() const {return fSteps;}
0052    void    Paint(Option_t *chopt="") override;
0053    virtual void    SaveAnimatedGif(const char *filename="") const;
0054    virtual void    SetSleepTime(Int_t stime=0) {fSleepTime = stime;}
0055 
0056    ClassDefOverride(TGraphTime,1)  //An array of objects evolving with time
0057 };
0058 
0059 #endif