Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3io.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
common
KM3io.jl
Merge requests
!20
Multihead support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Multihead support
multihead-support
into
main
Overview
0
Commits
2
Pipelines
0
Changes
3
Open
Tamas Gal
requested to merge
multihead-support
into
main
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
3
Expand
Adds MultiHead support for merged files.
0
0
Merge request reports
Compare
main
version 1
be605493
1 year ago
main (base)
and
latest version
latest version
ad7fe7ab
2 commits,
1 year ago
version 1
be605493
2 commits,
1 year ago
3 files
+
28
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
src/root/offline.jl
+
25
−
0
Options
@@ -148,6 +148,31 @@ function Base.getproperty(h::MCHeader, s::Symbol)
error
(
"no MC header entry found for '
$
(String(s))'"
)
end
"""
A structure which holds the headers of the merged files. Essentiall a `Vector{MCHead}`
with convenient accessors.
"""
struct
MultiHead
_headers
::
Vector
{
Dict
{
String
,
String
}}
end
function
UnROOT.readtype
(
io
,
::
Type
{
MultiHead
};
tkey
,
original_streamer
)
headers
=
Vector
{
Dict
{
String
,
String
}}()
# TODO: verify that this works. Int16 is suspicious
n_headers
=
UnROOT
.
readtype
(
io
,
Int16
)
# TODO: what are these bytes? do we need them?
skip
(
io
,
272
)
for
_
in
1
:
n_headers
# this gives the number of elements
n
=
UnROOT
.
readtype
(
io
,
Int32
)
skip
(
io
,
6
)
# the usual header stuff?
keys
=
[
UnROOT
.
readtype
(
io
,
String
)
for
i
∈
1
:
n
]
skip
(
io
,
6
)
# the usual header stuff?
values
=
[
UnROOT
.
readtype
(
io
,
String
)
for
i
∈
1
:
n
]
push!
(
headers
,
Dict
(
zip
(
keys
,
values
)))
end
MultiHead
(
headers
)
end
struct
OfflineTree
{
T
}
_fobj
::
UnROOT
.
ROOTFile
Loading