Belle II Software
development
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Symbols
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
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)
12
from
basf2
import
find_file
13
import
ROOT
14
15
path = find_file(
'framework/tests/chaintest_2.root'
)
16
17
with
ROOT.TFile(path)
as
f:
18
tree = f.Get(
'tree'
)
19
hits = ROOT.TClonesArray(
'Belle2::PXDSimHit'
)
20
tree.SetBranchAddress(
'PXDSimHits'
, hits)
21
tree.GetEntry(0)
22
assert
(hits.GetEntriesFast() > 0)
23
hit = hits[0]
24
hit.Dump()
framework
tests
pyroot_tfile.py
Generated on Sat May 17 2025 02:59:24 for Belle II Software by
1.13.2