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
Commits
6c9e75d3
Verified
Commit
6c9e75d3
authored
2 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Fix summaryslice readout and add mor tests
parent
a42e00a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/root/online.jl
+1
-1
1 addition, 1 deletion
src/root/online.jl
test/root.jl
+19
-0
19 additions, 0 deletions
test/root.jl
with
20 additions
and
1 deletion
src/root/online.jl
+
1
−
1
View file @
6c9e75d3
...
...
@@ -76,7 +76,7 @@ function UnROOT.interped_data(rawdata, rawoffsets, ::Type{SummarysliceHeader}, :
UnROOT
.
splitup
(
rawdata
,
rawoffsets
,
SummarysliceHeader
,
jagged
=
false
)
end
UnROOT
.
packedsizeof
(
::
Type
{
SummaryFrame
})
=
79
# incl. cnt and vers
UnROOT
.
packedsizeof
(
::
Type
{
SummaryFrame
})
=
55
# incl. cnt and vers
function
UnROOT.readtype
(
io
,
T
::
Type
{
SummaryFrame
})
dom_id
=
UnROOT
.
readtype
(
io
,
Int32
)
dq_status
=
UnROOT
.
readtype
(
io
,
UInt32
)
...
...
This diff is collapsed.
Click to expand it.
test/root.jl
+
19
−
0
View file @
6c9e75d3
...
...
@@ -5,6 +5,7 @@ using Test
const
DETX
=
datapath
(
"detx"
,
"detx_v3.detx"
)
const
DETX_44
=
datapath
(
"detx"
,
"km3net_offline.detx"
)
const
ONLINEFILE
=
datapath
(
"online"
,
"km3net_online.root"
)
const
OFFLINEFILE
=
datapath
(
"offline"
,
"km3net_offline.root"
)
const
IO_EVT
=
datapath
(
"daq"
,
"IO_EVT.dat"
)
...
...
@@ -88,4 +89,22 @@ const IO_EVT_LEGACY = datapath("daq", "IO_EVT_legacy.dat")
end
@test
2
==
length
(
events
)
s
=
f
.
summaryslices
@test
64
==
length
(
s
[
1
]
.
frames
)
@test
66
==
length
(
s
[
2
]
.
frames
)
@test
68
==
length
(
s
[
3
]
.
frames
)
@test
44
==
s
[
1
]
.
header
.
detector_id
==
s
[
2
]
.
header
.
detector_id
==
s
[
3
]
.
header
.
detector_id
module_values
=
Dict
(
808981510
:
(
fifo
=
true
),
808981523
:
(
fifo
=
false
),
)
det
=
Detector
(
DETX_44
)
module_ids
=
Set
(
keys
(
det
.
modules
))
for
(
s_idx
,
s
)
∈
enumerate
(
f
.
summaryslices
)
for
(
f_idx
,
frame
)
in
enumerate
(
s
.
frames
)
@test
frame
.
dom_id
∈
module_ids
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment