Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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
28protected:
29 Double_t *fEX{nullptr}; ///<[fNpoints] array of X errors
30 Double_t *fEY{nullptr}; ///<[fNpoints] array of Y errors
31 Double_t *fEZ{nullptr}; ///<[fNpoints] array of Z errors
32
33public:
37 Double_t *ex = nullptr, Double_t *ey = nullptr, Double_t *ez = nullptr, Option_t *option = "");
40 ~TGraph2DErrors() override;
41 virtual void AddPointError(Double_t x, Double_t y, Double_t z, Double_t ex = 0., Double_t ey = 0., Double_t ez = 0.);
42 Double_t GetErrorX(Int_t bin) const override;
43 Double_t GetErrorY(Int_t bin) const override;
44 Double_t GetErrorZ(Int_t bin) const override;
45 Double_t *GetEX() const override {return fEX;}
46 Double_t *GetEY() const override {return fEY;}
47 Double_t *GetEZ() const override {return fEZ;}
48 Double_t GetXmaxE() const override;
49 Double_t GetXminE() const override;
50 Double_t GetYmaxE() const override;
51 Double_t GetYminE() const override;
52 Double_t GetZmaxE() const override;
53 Double_t GetZminE() const override;
54 void Print(Option_t *chopt="") const override;
55 Int_t RemovePoint(Int_t ipoint); // *MENU*
56 void Scale(Double_t c1=1., Option_t *option="z") override; // *MENU*
57 void Set(Int_t n) override;
58 void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override;
60 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
61
62 ClassDefOverride(TGraph2DErrors,1) //A 2D graph with error bars
63};
64
65#endif
66
67
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Double_t GetErrorZ(Int_t bin) const override
TGraph2DErrors(Int_t n)
~TGraph2DErrors() override
Double_t GetYminE() const override
Double_t GetXminE() const override
Double_t * GetEZ() const override
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
Double_t * fEY
[fNpoints] array of Y errors
Double_t * GetEY() const override
void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override
void Scale(Double_t c1=1., Option_t *option="z") override
Double_t * fEZ
[fNpoints] array of Z errors
Double_t * GetEX() const override
Double_t GetErrorX(Int_t bin) const override
TGraph2DErrors(Int_t n, Double_t *x, Double_t *y, Double_t *z, Double_t *ex=nullptr, Double_t *ey=nullptr, Double_t *ez=nullptr, Option_t *option="")
void Print(Option_t *chopt="") const override
This method must be overridden when a class wants to print itself.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t GetZminE() const override
virtual void AddPointError(Double_t x, Double_t y, Double_t z, Double_t ex=0., Double_t ey=0., Double_t ez=0.)
TGraph2DErrors & operator=(const TGraph2DErrors &)
Double_t GetErrorY(Int_t bin) const override
Double_t * fEX
[fNpoints] array of X errors
Double_t GetYmaxE() const override
Double_t GetXmaxE() const override
Double_t GetZmaxE() const override
void Set(Int_t n) override
TGraph2DErrors(const TGraph2DErrors &)
Int_t RemovePoint(Int_t ipoint)
return c1
Definition legend1.C: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