From 9f7742359377bb809a48f6210db8df996e8d61d8 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Tue, 10 Mar 2020 16:03:24 +0100
Subject: [PATCH] Fix new jpp layout readout for timeslice hits

---
 km3io/daq.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/km3io/daq.py b/km3io/daq.py
index 4b47349..c65e7bd 100644
--- a/km3io/daq.py
+++ b/km3io/daq.py
@@ -294,8 +294,8 @@ class DAQTimeslice:
         """Populate a dictionary of frames with the module ID as key"""
         hits_buffer = self._hits_buffer[self._idx]
         n_hits = self._superframe[
-            b'vector<KM3NETDAQ::JDAQSuperFrame>.numberOfHits'].lazyarray(basketcache=BASKET_CACHE)[
-                self._idx]
+            b'vector<KM3NETDAQ::JDAQSuperFrame>.numberOfHits'].lazyarray(
+                basketcache=BASKET_CACHE)[self._idx]
         try:
             module_ids = self._superframe[
                 b'vector<KM3NETDAQ::JDAQSuperFrame>.id'].lazyarray(
@@ -303,7 +303,9 @@ class DAQTimeslice:
         except KeyError:
             module_ids = self._superframe[
                 b'vector<KM3NETDAQ::JDAQSuperFrame>.KM3NETDAQ::JDAQModuleIdentifier'].lazyarray(
-                    basketcache=BASKET_CACHE)[self._idx]
+                    uproot.asjagged(
+                        uproot.astable(uproot.asdtype([("dom_id", ">i4")]))),
+                    basketcache=BASKET_CACHE)[self._idx].dom_id
 
         idx = 0
         for module_id, n_hits in zip(module_ids, n_hits):
-- 
GitLab