Dear experts,
I’m trying to read a TBranch that was created with something like the following lines:
L = ROOT.TTree('name','name')
v=array('i',[0])
L.Branch('fibre',v, 'fibre/I')
for i in range(48):
v[0] = i
L.Fill()
#The branch looks like this:
************************
* Row * fibre *
************************
* 0 * 0 *
* 1 * 1 *
* 2 * 2 *
* 3 * 3 *
* 4 * 4 *
* 5 * 5 *
* 6 * 6 *
* 7 * 7 *
* 8 * 8 *
* 9 * 9 *
* 10 * 10 *
..................................
How can I read the elements on this branch? So far, I have tried something like:
ntuple = ROOT.TChain('L')
nEntries = ntuple.GetEntries()
for i in range (nEntries):
x = ntuple.fibre[0]
And I get this TypeError: ‘int’ object is not subscriptable
Thanks for any help.
Chilufya