7f1 = TFile.Open(
"ntuple.root",
"READ")
8t = f1.Get(
"trees/tree1")
9print(
":: entries:", t.GetEntries())
10print(
":: branches:", [b.GetName()
for b
in t.GetListOfBranches()])
11for i
in range(t.GetEntries()):
12 if t.GetEntry(i) <= 0:
13 print(
"** error reading entry [%i]" % (i,))
15 print(
":: entry [%i]..." % (i,))
16 print(
":: run:", t.run)
17 print(
":: size:", t.size)
18 print(
":: rundata:", list(t.rundata))
22print(
"::: histogram...")
23f2 = TFile.Open(
"hist.root",
"READ")
24h1 = f2.Get(
"simple1D/h1")
25print(
":: entries:", h1.GetEntries())
void print(char *figname, TCanvas *c1)