TMultiGraph.h

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TMultiGraph.h 36493 2010-11-03 13:01:36Z couet $
00002 // Author: Rene Brun   12/10/2000
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TMultiGraph
00013 #define ROOT_TMultiGraph
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TMultiGraph                                                          //
00019 //                                                                      //
00020 // A collection of TGraph objects                                       //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027 
00028 #include "TF1.h"
00029 
00030 class TH1F;
00031 class TAxis;
00032 class TBrowser;
00033 class TGraph;
00034 
00035 #include "TFitResultPtr.h"
00036 
00037 class TMultiGraph : public TNamed {
00038 
00039 protected:
00040    TList      *fGraphs;     //Pointer to list of TGraphs
00041    TList      *fFunctions;  //Pointer to list of functions (fits and user)
00042    TH1F       *fHistogram;  //Pointer to histogram used for drawing axis
00043    Double_t    fMaximum;    //Maximum value for plotting along y
00044    Double_t    fMinimum;    //Minimum value for plotting along y
00045 
00046    TMultiGraph(const TMultiGraph&);
00047    TMultiGraph& operator=(const TMultiGraph&);
00048 
00049 public:
00050    TMultiGraph();
00051    TMultiGraph(const char *name, const char *title);
00052    virtual ~TMultiGraph();
00053 
00054    virtual void      Add(TGraph *graph, Option_t *chopt="");
00055    virtual void      Add(TMultiGraph *multigraph, Option_t *chopt="");
00056    virtual void      Browse(TBrowser *b);
00057    virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
00058    virtual void      Draw(Option_t *chopt="");
00059    virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0); 
00060    virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Axis_t rxmin=0, Axis_t rxmax=0); 
00061    virtual void      FitPanel(); // *MENU*
00062    virtual Option_t *GetGraphDrawOption(const TGraph *gr) const;
00063    virtual void      LeastSquareLinearFit(Int_t ndata, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin, Double_t xmax);
00064    virtual void      LeastSquareFit(Int_t m, Double_t *a, Double_t xmin, Double_t xmax);
00065    virtual void      InitPolynom(Double_t xmin, Double_t xmax);
00066    virtual void      InitExpo(Double_t xmin, Double_t xmax);
00067    virtual void      InitGaus(Double_t xmin, Double_t xmax);
00068    virtual Int_t     IsInside(Double_t x, Double_t y) const;
00069    TH1F             *GetHistogram() const;
00070    TF1              *GetFunction(const char *name) const;
00071    TList            *GetListOfGraphs() const { return fGraphs; }
00072    TList            *GetListOfFunctions();  // non const method (create list if empty)
00073    const TList      *GetListOfFunctions() const { return fFunctions; } 
00074    TAxis            *GetXaxis() const;
00075    TAxis            *GetYaxis() const;
00076    virtual void      Paint(Option_t *chopt="");
00077    virtual void      Print(Option_t *chopt="") const;
00078    virtual void      RecursiveRemove(TObject *obj);
00079    virtual void      SavePrimitive(ostream &out, Option_t *option = "");
00080    virtual void      SetMaximum(Double_t maximum=-1111);
00081    virtual void      SetMinimum(Double_t minimum=-1111);
00082   
00083    ClassDef(TMultiGraph,2)  //A collection of TGraph objects
00084 };
00085 
00086 #endif
00087 
00088 

Generated on Tue Jul 5 14:22:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1