Hi rooters,
I am trying to get the list of leaves of a tree to which a friend has been attached.
The simplest case of my problem can be shown as follows:
myTree->AddFriend(…);
myTree->GetListOfLeaves()->ls();
The ls() command will only show the leaves of my initial tree, not those contained into my friends. I was thinking to access the friend separately (i.e. reload it) but this would be in complete contradiction with the concept of friends.
Note that myTree->Draw(“a_leaf_in_my_friend”) works perfectly, so as does myTree->GetLeaf(“a_leaf_in_my_friend”)->GetValue().
What am I doing wrong?
I basically want to use a loop (i < myTree->GetListOfLeaves()->GetEntries()) to check if the leaf name (myTree->GetListOfLeaves()->At(i)->GetName()) contains a certain string, in order to process that leaf. I’d prefer something like a search with wildcard feature but couldn’t find one.
Can anyone help me on this?
Thanks
Karolos