Hi,

I am filling a tree in pyROOT (root version 6.08). It does the job, doesn’t give any errors, but when I look at the values in TBrowser, all the variable-sized branches have values that are completely off from what I expect them to be (10^33 instead of 10^3).

Here is a snippet of the code I use:

```
class DigitToTree(Module):
def initialize(self):
print("Initializing DigitToTree module.")
self.f = TFile(OUTPUT, 'RECREATE')
self.t = TTree('tree', 'Tree with plain data from ECLCalDigits')
self.evtn = array('f', [0])
self.cellID = array('f', [0])
self.energy = array('f', [0])
self.energy_sum = array('f', [0])
self.time = array('f', [0])
self.nentries = array('i', [0])
self.cal = array('i', [0])
self.t.Branch('evtn', self.evtn, 'evtn/F')
self.t.Branch('nentries', self.nentries, 'nentries/I')
self.t.Branch('energy_sum', self.energy_sum, 'energy_sum/F')
self.t.Branch('cellID', self.cellID, 'cellID[nentries]/F')
self.t.Branch('energy', self.energy, 'energy[nentries]/F')
self.t.Branch('time', self.time, 'time[nentries]/F')
self.t.Branch('isCalibrated', self.cal, 'isCalibrated/I')
def terminate(self):
print("Finalizing DigitToTree module.")
self.f.Write()
self.f.Close()
'''
Convert ECLDigit data to simple ROOT Tree
'''
def event(self):
'''
Do conversion
'''
digits = PyStoreArray('ECLCalDigits')
self.evtn[0] += 1
self.energy_sum[0] = 0
self.nentries[0] = digits.getEntries()
print(digits.getEntries())
print('###############')
self.cal[0] = 0
for i in range(digits.getEntries()):
self.energy_sum[0] += digits[i].getEnergy()
included = getEventInclusions(digits, self.evtn[0])
for i in range(digits.getEntries()):
if (not included[i]): continue
self.cellID.insert(i, digits[i].getCellId())
self.energy.insert(i, digits[i].getEnergy())
self.time.insert(i, digits[i].getTime())
if (digits[i].isCalibrated()):
self.cal[0] = 1
else:
self.cal[0] = 0
self.t.Fill()
print(self.cellID)
del self.energy[:]
del self.cellID[:]
del self.time[:]
```

Branches ‘cellID’, ‘energy’ and ‘time’ are the problematic ones.

Any ideas of what went wrong?