Hello Experts,
I have a root file with a tree inside a directory:
TFile* test.root
TDirectoryFile* ana ana folder
KEY: TTree ntuple;1 Variables for selected events
Also, there is a variable called “Run” inside the tree.
I tried to access the Tree using the example from the pyRoot maual:
[code] myfile = ROOT.TFile(‘test.root’)
mychain = ROOT.gDirectory.Get(‘ana/ntuple’)
entries = mychain.GetEntriesFast()
for jentry in xrange(entries):
ientry = mychain.LoadTree(jentry)
if ientry< 0:
break
nb = mychain.GetEntry(jentry)
if nb <= 0:
continue
run = mychain.Run
print run
[/code]
But I got the error:
AttributeError: ‘TTree’ object has no attribute ‘Run’
Any suggestions?
Thanks!
Xin