Skip to content
Snippets Groups Projects
Verified Commit 6c9e75d3 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fix summaryslice readout and add mor tests

parent a42e00a8
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment