[root] / trunk / hist / hist / inc / TMultiGraph.h Repository:
ViewVC logotype

Annotation of /trunk/hist/hist/inc/TMultiGraph.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11584 - (view) (download) (as text)
Original Path: trunk/graf/inc/TMultiGraph.h

1 : brun 11584 // @(#)root/graf:$Name: $:$Id: TMultiGraph.h,v 1.5 2005/03/04 09:06:37 brun Exp $
2 : brun 754 // Author: Rene Brun 12/10/2000
3 :    
4 :     /*************************************************************************
5 :     * Copyright (C) 1995-2000, 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_TMultiGraph
13 :     #define ROOT_TMultiGraph
14 :    
15 :    
16 :     //////////////////////////////////////////////////////////////////////////
17 :     // //
18 :     // TMultiGraph //
19 :     // //
20 :     // A collection of TGraph objects //
21 :     // //
22 :     //////////////////////////////////////////////////////////////////////////
23 :    
24 :     #ifndef ROOT_TNamed
25 :     #include "TNamed.h"
26 :     #endif
27 :    
28 : brun 11226 #include "TF1.h"
29 : brun 754
30 :     class TH1F;
31 :     class TAxis;
32 :     class TBrowser;
33 :     class TGraph;
34 :    
35 :     class TMultiGraph : public TNamed {
36 :    
37 : brun 11226 protected:
38 :     TList *fGraphs; //Pointer to list of TGraphs
39 :     TList *fFunctions; //Pointer to list of functions (fits and user)
40 :     TH1F *fHistogram; //Pointer to histogram used for drawing axis
41 :     Double_t fMaximum; //Maximum value for plotting along y
42 :     Double_t fMinimum; //Minimum value for plotting along y
43 :    
44 :     public:
45 :    
46 :     TMultiGraph();
47 :     TMultiGraph(const char *name, const char *title);
48 :     virtual ~TMultiGraph();
49 : brun 11584 virtual void Add(TGraph *graph, Option_t *chopt="");
50 :     virtual void Browse(TBrowser *b);
51 :     virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
52 :     virtual void Draw(Option_t *chopt="");
53 :     virtual Int_t Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0);
54 :     virtual Int_t Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Axis_t rxmin=0, Axis_t rxmax=0);
55 :     virtual Option_t *GetGraphDrawOption(const TGraph *gr) const;
56 :     virtual void LeastSquareLinearFit(Int_t ndata, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin, Double_t xmax);
57 :     virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin, Double_t xmax);
58 :     virtual void InitPolynom(Double_t xmin, Double_t xmax);
59 :     virtual void InitExpo(Double_t xmin, Double_t xmax);
60 :     virtual void InitGaus(Double_t xmin, Double_t xmax);
61 :     TH1F *GetHistogram() const;
62 :     TF1 *GetFunction(const char *name) const;
63 :     TList *GetListOfGraphs() const { return fGraphs; }
64 :     TList *GetListOfFunctions() const { return fFunctions; }
65 :     TAxis *GetXaxis() const;
66 :     TAxis *GetYaxis() const;
67 :     virtual void Paint(Option_t *chopt="");
68 :     virtual void Print(Option_t *chopt="") const;
69 :     virtual void RecursiveRemove(TObject *obj);
70 :     virtual void SavePrimitive(ofstream &out, Option_t *option);
71 :     virtual void SetMaximum(Double_t maximum=-1111);
72 :     virtual void SetMinimum(Double_t minimum=-1111);
73 : brun 11226
74 :     ClassDef(TMultiGraph,2) //A collection of TGraph objects
75 : brun 754 };
76 :    
77 :     #endif
78 :    
79 :    

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9