From 82fe67c7ab08b4934c5eb8dcdb88ffe622c01a01 Mon Sep 17 00:00:00 2001 From: Tamas Gal <tgal@km3net.de> Date: Thu, 19 Dec 2019 15:30:21 +0100 Subject: [PATCH] Simplify class --- km3io/jpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/km3io/jpp.py b/km3io/jpp.py index fdf1165..70e1c88 100644 --- a/km3io/jpp.py +++ b/km3io/jpp.py @@ -74,6 +74,7 @@ class SummmarySlices: self._slices = None self._headers = None self._rates = None + self._ch_selector = ["ch{}".format(c) for c in range(31)] @property def headers(self): @@ -90,8 +91,7 @@ class SummmarySlices: @property def rates(self): if self._rates is None: - self._rates = self.slices[["dom_id"] + - ["ch{}".format(c) for c in range(31)]] + self._rates = self.slices[["dom_id"] + self._ch_selector] return self._rates def _read_summaryslices(self): @@ -102,7 +102,7 @@ class SummmarySlices: uproot.asdtype([("dom_id", "i4"), ("dq_status", "u4"), ("hrv", "u4"), ("fifo", "u4"), ("status3", "u4"), ("status4", "u4")] + - [("ch{}".format(c), "u1") for c in range(31)])), + [(c, "u1") for c in self._ch_selector])), skipbytes=10), basketcache=uproot.cache.ThreadSafeArrayCache( SUMMARYSLICE_FRAME_BASKET_CACHE_SIZE)) -- GitLab