dear ROOT-experts
I’m a newbye and need some help.
I have a data file data1.root which include a TTree
root [0] TFile *myfroot = new TFile(“data1.root”, “READ”);
root [1] TTree mytree2 = (TTree)myfroot->Get(“liveTime”);
I can print the content with a Scan() and see the tree has 201 rows.
root [2] mytree2->Scan();
- Row * Instance * run * dummy1 * live * dummy2 * dummy3 *
-
0 * 0 * 1 * 28 * 916 * 1 * 0 *
-
0 * 1 * 1 * 28 * 916 * 2 * 0 *
[…]
I’d like to loop over the rows and put the contents of the branch “live”
(5th column in the table above) into a double.
something like
for (int n=1; nGetEntries(); n++)
{
double x=mytree2->SomeMagicHere(“live”,n);
}
I appreciate if someone could please help?
thanks, eric