[ROOT] <About reading a .root file>

From: Yang Ruizhe (jet@hep.pku.edu.cn)
Date: Sat Jun 26 2004 - 08:20:02 MEST


Hi, ROOTers!

I have a problem when reading .root file created by myself.

For example, I have created a .root file called "r.root" storing a TNtuple("test","","x:y")

In the next step, load it by

TFile f("r.root");
TNtuple* n = (TNtuple*) f.Get("test");
Int_t count = n->GetEntries();
for(Int_t i = 0; i<count; i++)
{
  ??????
}

Then, if I want to read exactly the x and y value correspoding to the No. i entry, what should I do? I checked the source code for TNtuple and TTree but could not find the right member function to do this job.

Thank you very much.

Best Regards,
Yang Ruizhe

2004.6.26.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET