Hi,
Can someone help me with this?
I need to get, read and display on the screen data (point, error). I tried to do it, but couldn’t.
I upload the file that I need to obtain the data points:
The fitexample.C file has the code that reads the lines2.root file. I need to get the points from the .root file.
It looks like you’re loading the file into your TFile object, but you never access the data inside it. The histograms contained in it aren’t automatically available; you’ll have to do something like:
TH1F *h0 = (TH1F*)inFile->Get("h0");
The method TFile::Get() returns a TObject* so you’ll have to cast it to a TH1F*.