Belle II Software
release-05-01-25
pyroot_tfile.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
# This test catches a regression in PyRoot (in root 5.34/19+?, fixed in 5.34/23)
5
from
basf2
import
find_file
6
import
ROOT
7
8
path = find_file(
'framework/tests/chaintest_2.root'
)
9
f = ROOT.TFile(path)
10
tree = f.Get(
'tree'
)
11
12
tree.GetEntry(0)
13
hits = tree.PXDSimHits
14
nentries = hits.GetEntriesFast()
15
print(nentries)
16
hit = hits[0]
17
hit.Dump()
framework
tests
pyroot_tfile.py
Generated on Fri Nov 5 2021 03:53:01 for Belle II Software by
1.8.17