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

Add timeslice streamds

parent 5bcc6793
No related branches found
No related tags found
No related merge requests found
Pipeline #7900 passed with warnings
......@@ -150,6 +150,8 @@ class DAQTimeslices:
TIMESLICE_FRAME_BASKET_CACHE_SIZE))
self._timeslices[stream.decode("ascii")] = (headers, superframes,
hits_buffer)
setattr(self, stream.decode("ascii"),
DAQTimesliceStream(headers, superframes, hits_buffer))
def stream(self, stream, idx):
ts = self._timeslices[stream]
......@@ -163,6 +165,21 @@ class DAQTimeslices:
return str(self)
class DAQTimesliceStream:
def __init__(self, headers, superframes, hits_buffer):
# self.headers = headers.lazyarray(
# uproot.asjagged(uproot.astable(
# uproot.asdtype(
# np.dtype([('a', 'i4'), ('b', 'i4'), ('c', 'i4'),
# ('d', 'i4'), ('e', 'i4')]))),
# skipbytes=6),
# basketcache=uproot.cache.ThreadSafeArrayCache(
# TIMESLICE_FRAME_BASKET_CACHE_SIZE))
self.headers = headers
self.superframes = superframes
self._hits_buffer = hits_buffer
class DAQTimeslice:
"""A wrapper for a DAQ timeslice"""
def __init__(self, header, superframe, hits_buffer, idx, stream):
......
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