I’d like to use the nice iterable nature of a tree, but with friends. These friends have branches that have the same name as those in the main tree.
So what I want is something like:
tree = TTree("t", "t")
friendtree = TTree("tf", "tf")
for event in tree:
print '{0} {1}'.format(event.x, event.tf.x)
But this doesn’t work. Can you help please?