Missing TGraphAsymmErrors constructor reading from filename

Hello,

System: Linux ddehp2016.cern.ch 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ROOT version: ROOT 6.04 (or 6.06, just downloaded)

At variance with the source code posted at root.cern.ch/doc/master/TGraphA … tml#l00298, the TGraphAsymmErrors constructor reading from filename does not appear to exist:

root> TGraphAsymmErrors *graph = new TGraphAsymmErrors(“filename.txt”,"%lg %lg %lg %lg %lg %lg","");
ROOT_prompt_0:1:45: error: no matching constructor for initialization of ‘TGraphAsymmErrors’

Only candidate constructors avlaalble:
TGraphAsymmErrors TGraphAsymmErrors()
TGraphAsymmErrors TGraphAsymmErrors(Int_t n)
TGraphAsymmErrors TGraphAsymmErrors(Int_t n, const Double_t* x, const Double_t* y, const Double_t* exl = 0, const Double_t* exh = 0, const Double_t* eyl = 0, const Double_t* eyh = 0)
TGraphAsymmErrors TGraphAsymmErrors(Int_t n, const Float_t* x, const Float_t* y, const Float_t* exl = 0, const Float_t* exh = 0, const Float_t* eyl = 0, const Float_t* eyh = 0)
TGraphAsymmErrors TGraphAsymmErrors(const TGraphAsymmErrors& gr)
TGraphAsymmErrors TGraphAsymmErrors(const TH1* h)
TGraphAsymmErrors TGraphAsymmErrors(const TH1* pass, const TH1* total, Option_t* option = “”)
TGraphAsymmErrors TGraphAsymmErrors(const TVectorD& vx, const TVectorD& vy, const TVectorD& vexl, const TVectorD& vexh, const TVectorD& veyl, const TVectorD& veyh)
TGraphAsymmErrors TGraphAsymmErrors(const TVectorF& vx, const TVectorF& vy, const TVectorF& vexl, const TVectorF& vexh, const TVectorF& veyl, const TVectorF& veyh)

What’s the problem here?

Thanks.

David

Hi David,

you have the “” as the last parameter in your constructor, what is this?

hi,

this was supposed to be the option pointer:
TGraphAsymmErrors::TGraphAsymmErrors(const char *filename, const char *format, Option_t *option)

but I actually have the problem without it:

TGraphAsymmErrors *g = new TGraphAsymmErrors(“file.txt”,"%lg %lg %lg %lg %lg %lg");
/usr/local/root-6.04.16/include/TGraphAsymmErrors.h:58:4: note: candidate constructor not viable:…

TGraphAsymmErrors *g = new TGraphAsymmErrors(“file.txt”);
/usr/local/root-6.04.16/include/TGraphAsymmErrors.h:58:4: note: candidate constructor not viable:…

this is not the issue. did you try to run the command ?

d.

But where did you get this constructor? I don’t see it in the
root.cern.ch/root/html604/TGrap … rrors.html
. Though it does indeed exist for plain TGraph:
root.cern.ch/root/html604/TGraph.html
:

	TGraph(const char* filename, const char* format = "%lg %lg", Option_t* option = "")

my first post says it … from here:

root.cern.ch/doc/master/TGraphA … tml#l00298

I copied the function from there (adding it also into TGraphAsymmErrors.h) into my local ROOT 6.06 installation and recompiled. It’s working for me. It would be good if it works for all …

d.