#ifndef ROOT_TGraph2D
#define ROOT_TGraph2D
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TVirtualHistPainter
#include "TVirtualHistPainter.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
#ifndef ROOT_TAttMarker
#include "TAttMarker.h"
#endif
class TAxis;
class TList;
class TF2;
class TH2;
class TH2D;
class TView;
class TDirectory;
#include "TFitResultPtr.h"
class TGraph2D : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
protected:
Int_t fNpoints;
Int_t fNpx;
Int_t fNpy;
Int_t fMaxIter;
Int_t fSize;
Double_t *fX;
Double_t *fY;
Double_t *fZ;
Double_t fMinimum;
Double_t fMaximum;
Double_t fMargin;
Double_t fZout;
TList *fFunctions;
TH2D *fHistogram;
TDirectory *fDirectory;
TVirtualHistPainter *fPainter;
void Build(Int_t n);
private:
Bool_t fUserHisto;
protected:
public:
TGraph2D();
TGraph2D(Int_t n);
TGraph2D(Int_t n, Int_t *x, Int_t *y, Int_t *z);
TGraph2D(Int_t n, Float_t *x, Float_t *y, Float_t *z);
TGraph2D(Int_t n, Double_t *x, Double_t *y, Double_t *z);
TGraph2D(TH2 *h2);
TGraph2D(const char *name, const char *title, Int_t n, Double_t *x, Double_t *y, Double_t *z);
TGraph2D(const char *filename, const char *format="%lg %lg %lg", Option_t *option="");
TGraph2D(const TGraph2D &);
virtual ~TGraph2D();
TGraph2D& operator=(const TGraph2D &);
virtual void Browse(TBrowser *);
virtual void Clear(Option_t *option="");
virtual void DirectoryAutoAdd(TDirectory *);
Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t *option="");
void ExecuteEvent(Int_t event, Int_t px, Int_t py);
virtual TObject *FindObject(const char *name) const;
virtual TObject *FindObject(const TObject *obj) const;
virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="");
virtual TFitResultPtr Fit(TF2 *f2 ,Option_t *option="" ,Option_t *goption="");
virtual void FitPanel();
TList *GetContourList(Double_t contour);
TDirectory *GetDirectory() const {return fDirectory;}
Int_t GetNpx() const {return fNpx;}
Int_t GetNpy() const {return fNpy;}
TH2D *GetHistogram(Option_t *option="");
TList *GetListOfFunctions() const { return fFunctions; }
virtual Double_t GetErrorX(Int_t bin) const;
virtual Double_t GetErrorY(Int_t bin) const;
virtual Double_t GetErrorZ(Int_t bin) const;
Double_t GetMargin() const {return fMargin;}
Double_t GetMaximum() const {return fMaximum;};
Double_t GetMinimum() const {return fMinimum;};
TAxis *GetXaxis() const ;
TAxis *GetYaxis() const ;
TAxis *GetZaxis() const ;
Int_t GetN() const {return fNpoints;}
Double_t *GetX() const {return fX;}
Double_t *GetY() const {return fY;}
Double_t *GetZ() const {return fZ;}
virtual Double_t *GetEX() const {return 0;}
virtual Double_t *GetEY() const {return 0;}
virtual Double_t *GetEZ() const {return 0;}
Double_t GetXmax() const;
Double_t GetXmin() const;
Double_t GetYmax() const;
Double_t GetYmin() const;
Double_t GetZmax() const;
Double_t GetZmin() const;
virtual Double_t GetXmaxE() const {return GetXmax();};
virtual Double_t GetXminE() const {return GetXmin();};
virtual Double_t GetYmaxE() const {return GetYmax();};
virtual Double_t GetYminE() const {return GetYmin();};
virtual Double_t GetZmaxE() const {return GetZmax();};
virtual Double_t GetZminE() const {return GetZmin();};
Double_t Interpolate(Double_t x, Double_t y);
void Paint(Option_t *option="");
TH1 *Project(Option_t *option="x") const;
Int_t RemovePoint(Int_t ipoint);
virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void Set(Int_t n);
virtual void SetDirectory(TDirectory *dir);
virtual void SetHistogram(TH2 *h);
void SetMargin(Double_t m=0.1);
void SetMarginBinsContent(Double_t z=0.);
void SetMaximum(Double_t maximum=-1111);
void SetMinimum(Double_t minimum=-1111);
void SetMaxIter(Int_t n=100000) {fMaxIter = n;}
virtual void SetName(const char *name);
virtual void SetNameTitle(const char *name, const char *title);
void SetNpx(Int_t npx=40);
void SetNpy(Int_t npx=40);
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z);
virtual void SetTitle(const char *title="");
ClassDef(TGraph2D,1)
};
#endif