From bda704e4b68934acec7c6b75852aee0ce7b02119 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Fri, 11 Dec 2020 23:32:51 +0100
Subject: [PATCH] Cleanup

---
 km3io/rootio.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/km3io/rootio.py b/km3io/rootio.py
index a816ad1..56a7fec 100644
--- a/km3io/rootio.py
+++ b/km3io/rootio.py
@@ -363,12 +363,11 @@ class Branch:
         if not self._index_chain:
             return self._branch.num_entries
         elif isinstance(self._index_chain[-1], (int, np.int32, np.int64)):
-            if len(self._index_chain) == 1:
-                return 1
-                # try:
-                #     return len(self[:])
-                # except IndexError:
-                #     return 1
+            # we stick to the convention and return the 1 for a single subbranch
+            # if len(self._index_chain) == 1:
+            #     # single "event" is selected
+            #     # return len(self.id)
+            #     return 1
             return 1
         else:
             # ignore the usual index magic and access `id` directly
-- 
GitLab