User Tools

Site Tools


Accessing Events in a Tree

To access the events in a tree no variables need to be assigned to the different branches. Instead the leaves are available as properties of the tree, returning the values of the present event.

print tree.Z0_MM  # 18558.9
print tree.Z0_MM  # 2896.5

To iterate over all events, a for loop can be used directly on the tree object

for event in tree:
    print event.Z0_MM
root/pyrootgetevent.txt · Last modified: 2013/11/20 14:24 by nchiap