From ec3aafd40ad09496a6e9b298d466bb2d6d2f5299 Mon Sep 17 00:00:00 2001
From: Dominik Smith <smith@th.physik.uni-frankfurt.de>
Date: Mon, 17 Apr 2023 11:33:25 +0200
Subject: [PATCH] UnpackTof/T0: removed fNumChansPerAsic and fNumAsicsPerModule
 from parameter structs, as they don't appear to be needed.

---
 algo/detectors/t0/UnpackT0.h   | 2 --
 algo/detectors/tof/UnpackTof.h | 2 --
 reco/tasks/CbmTaskUnpack.cxx   | 8 --------
 3 files changed, 12 deletions(-)

diff --git a/algo/detectors/t0/UnpackT0.h b/algo/detectors/t0/UnpackT0.h
index 6ade5e5816..d4b2b07325 100644
--- a/algo/detectors/t0/UnpackT0.h
+++ b/algo/detectors/t0/UnpackT0.h
@@ -40,8 +40,6 @@ namespace cbm::algo
    ** @brief Parameters required for the STS unpacking (specific to one component)
    **/
   struct UnpackT0Par {
-    uint32_t fNumChansPerAsic                  = 0;   ///< Number of channels per ASIC
-    uint32_t fNumAsicsPerModule                = 0;   ///< Number of ASICS per module
     std::vector<UnpackT0ElinkPar> fElinkParams = {};  ///< Parameters for each eLink
   };
 
diff --git a/algo/detectors/tof/UnpackTof.h b/algo/detectors/tof/UnpackTof.h
index 2710dd8619..ac1166be47 100644
--- a/algo/detectors/tof/UnpackTof.h
+++ b/algo/detectors/tof/UnpackTof.h
@@ -38,8 +38,6 @@ namespace cbm::algo
    ** @brief Parameters required for the STS unpacking (specific to one component)
    **/
   struct UnpackTofPar {
-    uint32_t fNumChansPerAsic                   = 0;   ///< Number of channels per ASIC
-    uint32_t fNumAsicsPerModule                 = 0;   ///< Number of ASICS per module
     std::vector<UnpackTofElinkPar> fElinkParams = {};  ///< Parameters for each eLink
   };
 
diff --git a/reco/tasks/CbmTaskUnpack.cxx b/reco/tasks/CbmTaskUnpack.cxx
index 5249821317..e394e45c5a 100644
--- a/reco/tasks/CbmTaskUnpack.cxx
+++ b/reco/tasks/CbmTaskUnpack.cxx
@@ -330,14 +330,10 @@ InitStatus CbmTaskUnpack::Init()
     LOG(info) << "--- Configured equipment " << equip << " with " << numElinks << " elinks";
   }
 
-  // --- Common parameters for all components for TOF
-  uint32_t numChansPerAsicTof = 4;  // R/O channels per ASIC for TOF
-
   // Create one algorithm per component and configure it with parameters
   auto equipIdsTof = fTofConfig.GetEquipmentIds();
   for (auto& equip : equipIdsTof) {
     std::unique_ptr<UnpackTofPar> par(new UnpackTofPar());
-    par->fNumChansPerAsic  = numChansPerAsicTof;
     const size_t numElinks = fTofConfig.GetNumElinks(equip);
     for (size_t elink = 0; elink < numElinks; elink++) {
       UnpackTofElinkPar elinkPar;
@@ -349,14 +345,10 @@ InitStatus CbmTaskUnpack::Init()
     LOG(info) << "--- Configured equipment " << equip << " with " << numElinks << " elinks";
   }
 
-  // --- Common parameters for all components for T0
-  uint32_t numChansPerAsicT0 = 4;  // R/O channels per ASIC for T0
-
   // Create one algorithm per component and configure it with parameters
   auto equipIdsT0 = fT0Config.GetEquipmentIds();
   for (auto& equip : equipIdsT0) {
     std::unique_ptr<UnpackT0Par> par(new UnpackT0Par());
-    par->fNumChansPerAsic  = numChansPerAsicT0;
     const size_t numElinks = fT0Config.GetNumElinks(equip);
     for (size_t elink = 0; elink < numElinks; elink++) {
       UnpackT0ElinkPar elinkPar;
-- 
GitLab