ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExHiveAthenaPool
python
ReadHiveDataObjs.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
import
ROOT
4
5
file = ROOT.TFile.Open(
"myExampleStream.pool.root"
)
6
7
# CollectionTree is the default TTree name for Event Data
8
tree = file.Get(
"CollectionTree"
)
9
tree.GetEntry(0)
10
11
# Find the branches containing HiveDataObj
12
brNames = [
13
b.GetName()
14
for
b
in
tree.GetListOfBranches()
15
if
b.GetName().startswith(
"HiveDataObj"
)
16
]
17
18
print
(
" ---- "
.join([
" Event"
] + [name[12:]
for
name
in
brNames]))
19
# Loop over all rows (events) - get objects from the HiveDataObj branches with "getattr(tree,b)"
20
lineformat =
"{:>8}"
* (len(brNames) + 1)
21
for
evt
in
range(tree.GetEntries()):
22
tree.GetEntry(evt)
23
print
(lineformat.format(evt + 1, *[getattr(tree, b).val()
for
b
in
brNames]))
print
void print(char *figname, TCanvas *c1)
Definition
TRTCalib_StrawStatusPlots.cxx:26
Generated on
for ATLAS Offline Software by
1.17.0