From 6395836003b3f147d58e2b5a10b320d212b3a9f5 Mon Sep 17 00:00:00 2001
From: "se.gorbunov" <se.gorbunov@gsi.de>
Date: Tue, 18 Oct 2022 21:01:28 +0000
Subject: [PATCH] L1: fix a bug introduced in
 1690917f6dacfefdc569834c31e164a54db24965 in sub-timeslice split

---
 reco/L1/CbmL1ReadEvent.cxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx
index 3cbcc3b8cc..8be7cee15a 100644
--- a/reco/L1/CbmL1ReadEvent.cxx
+++ b/reco/L1/CbmL1ReadEvent.cxx
@@ -756,8 +756,12 @@ void CbmL1::ReadEvent(float& TsStart, float& TsLength, float& /*TsOverlap*/, int
         }
 
         /// stop if reco TS ends and many hits left
-        if (!event)
-          if ((th.time > (TsStart + TsLength)) && ((nEntSts - hitIndex) > 300)) { break; }
+        if (!event) {
+          if ((th.time > (TsStart + TsLength)) && ((nEntSts - hitIndex) > 300)) {
+            areDataLeft = true;  // there are unprocessed data left in the time slice
+            break;
+          }
+        }
 
         TVector3 pos, err;
         h->Position(pos);
-- 
GitLab