From e2949f0908aba67f0e0aa955ad444d99a1c9ed4b Mon Sep 17 00:00:00 2001
From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de>
Date: Wed, 4 Oct 2023 11:59:57 +0200
Subject: [PATCH] algo: Unpack RICH in paralllel.

---
 algo/unpack/Unpack.cxx | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/algo/unpack/Unpack.cxx b/algo/unpack/Unpack.cxx
index 9d001ade18..c1741aaea7 100644
--- a/algo/unpack/Unpack.cxx
+++ b/algo/unpack/Unpack.cxx
@@ -48,6 +48,11 @@ namespace cbm::algo
         ParallelMsLoop(Subsystem::MUCH, monitor, digiTs.fMuch, monitor.fMuch, *timeslice, fAlgoMuch, 0x20);
     }
 
+    if (DetectorEnabled(Subsystem::RICH)) {
+      monitor.fNumBytesInRich +=
+        ParallelMsLoop(Subsystem::RICH, monitor, digiTs.fRich, monitor.fRich, *timeslice, fAlgoRich, 0x03);
+    }
+
     // ---  Component loop
     for (uint64_t comp = 0; comp < timeslice->num_components(); comp++) {
 
@@ -87,10 +92,10 @@ namespace cbm::algo
         monitor.fNumBytesInTrd2d +=
           MsLoop(timeslice, fAlgoTrd2d, comp, equipmentId, &digiTs.fTrd2d, monitor, &monitor.fTrd2d, 0x02);
       }
-      if (subsystem == Subsystem::RICH) {
-        monitor.fNumBytesInRich +=
-          MsLoop(timeslice, fAlgoRich, comp, equipmentId, &digiTs.fRich, monitor, &monitor.fRich, 0x03);
-      }
+      // if (subsystem == Subsystem::RICH) {
+      //   monitor.fNumBytesInRich +=
+      //     MsLoop(timeslice, fAlgoRich, comp, equipmentId, &digiTs.fRich, monitor, &monitor.fRich, 0x03);
+      // }
     }  //# component
 
     // --- Sorting of output digis. Is required by both digi trigger and event builder.
-- 
GitLab