Hi ROOT folks,
I have the following problem: given a TTree object containing a branch beeing a std::vector I try to access its elements using
TTreeFormula * form = new TTreeFormula(“form”, “myBranch”, tree);
tree->GetEntry(0);
cout << "instance 0: " << form->EvalInstance(0) << endl;
cout << "instance 1: " << form->EvalInstance(1) << endl;
cout << "instance 2: " << form->EvalInstance(2) << endl;
cout << "instance 3: " << form->EvalInstance(3) << endl;
While the branch “myBranch” has in entry 0 more than 2 elements in the vector (checked with tree->Scan()), only the first two get evaluated correctly, the rest is evaluated to zero. Is this a bug, any feature I don’t know or am I simply misunderstanding the way the TTreeFormual can be used.
Thank you very much for your help!!
Cheers,
Andi