4f1 = ROOT.TFile.Open(
"ntuple.root",
"READ")
5t = f1.Get(
"trees/tree1")
6print ":: entries:",t.GetEntries()
7print ":: branches:",[b.GetName()
for b
in t.GetListOfBranches()]
8for i
in xrange(t.GetEntries()):
10 print "** error reading entry [%i]" % (i,)
12 print ":: entry [%i]..." % (i,)
14 print ":: size:",t.size
15 print ":: rundata:",list(t.rundata)
19print "::: histogram..."
20f2 = ROOT.TFile.Open(
"hist.root",
"READ")
21h1 = f2.Get(
"simple1D/h1")
22print ":: entries:",h1.GetEntries()
void xrange(TH1 *h, bool symmetric)