Hi,
I'm having difficulties retrieving a branch out of a tree using PyROOT. The structure of the tree is the following:
root [0] TFile f("root_output/correl_SI_822_ALFA_32.root") root [1] f.ls()
TFile** root_output/correl_SI_822_ALFA_32.root TFile* root_output/correl_SI_822_ALFA_32.rootKEY: TTree correl_tree;1 tree combining data from the SI telescope and ALFA root [2] correl_tree.Print()
My python code looks like this:
#++++++++++++++++++++++++++++++++++++++++
from ROOT import TFile
from ROOT import gDirectory
file = TFile( 'root_output/correl_SI_822_ALFA_32.root' )
tree = gDirectory.Get( 'correl_tree' )
entries = tree.GetEntriesFast()
for jentry in xrange(entries):
ientry = tree.LoadTree( jentry )
if ientry < 0:
break
nb = tree.GetEntry( jentry )
if nb <= 0:
continue
for nEvent in tree.pmfDataMD:
if nEvent >= 1: print nEvent #++++++++++++++++++++++++++++++++++++++++++++++++
This works for all branches except pmfDataMD ! I guess the problem lies in the boolean nature of the pmfDataMD-branch.
How do extract this boolean branch out of the tree.
Cheers,
Dennis
Received on Tue Nov 25 2008 - 14:38:26 CET
This archive was generated by hypermail 2.2.0 : Tue Nov 25 2008 - 17:50:01 CET