Looping to create new Branches with different data

You need branch=tree.Branch(...) and then branch.Fill() instead of tree.Fill().

BTW. Ensure all branches have precisely the same number of entries (otherwise, expect problems with your tree later).

1 Like