Logo ROOT  
Reference Guide
TGraph2DErrors.h
Go to the documentation of this file.
1// @(#)root/hist:$Id: TGraph2DErrors.h,v 1.00
2// Author: Olivier Couet 26/11/2003
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_TGraph2DErrors
13#define ROOT_TGraph2DErrors
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TGraph2DErrors //
19// //
20// a 2D Graph with error bars //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TGraph2D.h"
25
26class TGraph2DErrors : public TGraph2D {
27
28private:
29
30
31protected:
32 Double_t *fEX; ///<[fNpoints] array of X errors
33 Double_t *fEY; ///<[fNpoints] array of Y errors
34 Double_t *fEZ; ///<[fNpoints] array of Z errors
35
36public:
40 Double_t *ex=0, Double_t *ey=0, Double_t *ez=0, Option_t *option="");
43 virtual ~TGraph2DErrors();
44 Double_t GetErrorX(Int_t bin) const;
45 Double_t GetErrorY(Int_t bin) const;
46 Double_t GetErrorZ(Int_t bin) const;
47 Double_t *GetEX() const {return fEX;}
48 Double_t *GetEY() const {return fEY;}
49 Double_t *GetEZ() const {return fEZ;}
50 Double_t GetXmaxE() const;
51 Double_t GetXminE() const;
52 Double_t GetYmaxE() const;
53 Double_t GetYminE() const;
54 Double_t GetZmaxE() const;
55 Double_t GetZminE() const;
56 virtual void Print(Option_t *chopt="") const;
57 Int_t RemovePoint(Int_t ipoint); // *MENU*
58 virtual void Set(Int_t n);
59 virtual void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z);
60 virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez);
61
62 ClassDef(TGraph2DErrors,1) //A 2D graph with error bars
63};
64
65#endif
66
67
int Int_t
Definition: CPyCppyy.h:43
double Double_t
Definition: RtypesCore.h:57
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
Graph 2D class with errors.
Double_t GetYmaxE() const
Returns the Y maximum with errors.
Double_t * GetEY() const
Double_t GetXminE() const
Returns the X minimum with errors.
Double_t * GetEX() const
Double_t GetZminE() const
Returns the Z minimum with errors.
Double_t * fEY
[fNpoints] array of Y errors
Double_t GetZmaxE() const
Returns the Z maximum with errors.
virtual void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z)
Set x, y and z values for point number i.
Double_t GetErrorX(Int_t bin) const
This function is called by Graph2DFitChisquare.
virtual void Print(Option_t *chopt="") const
Print 2D graph and errors values.
Double_t * fEZ
[fNpoints] array of Z errors
Double_t GetErrorY(Int_t bin) const
This function is called by Graph2DFitChisquare.
virtual void Set(Int_t n)
Set number of points in the 2D graph.
Double_t GetXmaxE() const
Returns the X maximum with errors.
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
Set ex, ey and ez values for point number i.
TGraph2DErrors & operator=(const TGraph2DErrors &)
Assignment operator Copy everything except list of functions.
Double_t * fEX
[fNpoints] array of X errors
Double_t GetErrorZ(Int_t bin) const
This function is called by Graph2DFitChisquare.
virtual ~TGraph2DErrors()
TGraph2DErrors destructor.
TGraph2DErrors()
TGraph2DErrors default constructor.
Double_t * GetEZ() const
Double_t GetYminE() const
Returns the Y minimum with errors.
Int_t RemovePoint(Int_t ipoint)
Deletes point number ipoint.
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition: TGraph2D.h:41
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
Double_t ey[n]
Definition: legend1.C:17
Double_t ex[n]
Definition: legend1.C:17