Hi experts,
I’m trying to automate the address generation from a root file input. The input tree has a heirarchy of branches, so simply getting a branch list is not enough, I have to get a Leaf list. But I will write the leaf list out to branches. I use
TObjArray *inLeafList = inTree->GetListOfLeaves();
int i=0; TLeaf *inL=0; TIter nextInL(inLeafList);
while ((inL=(TLeaf*)nextInL())) {
outTree->Branch(inL->GetName(),inL->GetAddress());
i++;
}
But the function GetAddress() only works for TBranch, not for a Tleaf. Is there a workaround for this?