Hello,
I am trying to retrieve a TTree from a TFile. I have tried using Get, which results in a segmentation violation (the TTree is called “ntp2” in all of the files that I am working with):
TFile * f = new TFile("foo.root");
f->Get("ntp2");
I want to be able to store the TTree as a class variable for plotting purposes, so that I can use the draw command in my class. Right now, I have a command of the form:
_ntp2 = (TTree*)_File->Get("ntp2");
which generates the error described above. What is the proper way to retrieve the TTree from the TFile?
I am using ROOT 4.04/02b with CINT 5.15.169.
Thank you,
Adrian