Belle II Software light-2406-ragdoll
pyroot_tfile.py
1#!/usr/bin/env python3
2
3
10
11# This test catches a regression in PyRoot (in root 5.34/19+?, fixed in 5.34/23)
12from basf2 import find_file
13import ROOT
14
15path = find_file('framework/tests/chaintest_2.root')
16f = ROOT.TFile(path)
17tree = f.Get('tree')
18
19tree.GetEntry(0)
20hits = tree.PXDSimHits
21nentries = hits.GetEntriesFast()
22print(nentries)
23hit = hits[0]
24hit.Dump()