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

Use daqparser

parent 170c9f64
No related branches found
No related tags found
No related merge requests found
......@@ -56,22 +56,15 @@ class DOMActivityPlotter(kp.Module):
if self.index % 30:
return blob
tag = str(blob['CHPrefix'].tag)
if 'RawSummaryslice' in blob:
summaryslice = blob['RawSummaryslice']
timestamp = summaryslice.header.time_stamp
if tag != 'IO_SUM':
return blob
data = blob['CHData']
data_io = BytesIO(data)
preamble = kp.io.daq.DAQPreamble(file_obj=data_io) # noqa
summaryslice = kp.io.daq.DAQSummaryslice(file_obj=data_io)
timestamp = summaryslice.header.time_stamp
for dom_id, _ in summaryslice.summary_frames.items():
du, dom, _ = self.detector.doms[dom_id]
self.last_activity[(du, dom)] = timestamp
for dom_id, _ in summaryslice.summary_frames.items():
du, dom, _ = self.detector.doms[dom_id]
self.last_activity[(du, dom)] = timestamp
self.cuckoo.msg()
self.cuckoo.msg()
return blob
......
......@@ -57,16 +57,14 @@ class MonitorRates(kp.Module):
if self.index % 30:
return blob
data = blob['CHData']
data_io = BytesIO(data)
preamble = kp.io.daq.DAQPreamble(file_obj=data_io) # noqa
summaryslice = kp.io.daq.DAQSummaryslice(file_obj=data_io)
self.rates = {} # TODO: review this hack
for dom_id, rates in summaryslice.summary_frames.items():
du, dom, _ = self.detector.doms[dom_id]
self.rates[(du, dom)] = np.sum(rates) / 1000
self.cuckoo.msg()
if 'RawSummaryslice' in blob:
summaryslice = blob['RawSummaryslice']
self.rates = {} # TODO: review this hack
for dom_id, rates in summaryslice.summary_frames.items():
du, dom, _ = self.detector.doms[dom_id]
self.rates[(du, dom)] = np.sum(rates) / 1000
self.cuckoo.msg()
return blob
......
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