I am experiencing a problem when trying to write a TBranch to a ROOT file using a loop in pyROOT.
myFloats = (array( ‘f’, 100*[ 0.0 ] )
myTree.Branch(“someBranch”, myFloats, “someBranch/F” )
for entry, event in enumerate(myOtherTree, start=1):
values = getattr(event, “anotherBranch”)
for i, val in enumerate(values, start=0):
Instead of size 100 (for example), the size of each entry is 1 instead, even though when I print the array myFloats all the values are present. I am hoping that this is something trivial.