From a1d0e93be26f4030a72d96afc296d7d4e1b26dab Mon Sep 17 00:00:00 2001
From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de>
Date: Thu, 15 Jun 2023 11:10:03 +0000
Subject: [PATCH] algo: Change include scheme.

---
 algo/CMakeLists.txt                   | 10 ++--------
 algo/evselector/DigiEventSelector.cxx |  2 +-
 algo/global/Reco.h                    |  4 ++--
 algo/test/_GTestDigiEventSelector.cxx |  2 +-
 reco/detectors/sts/CbmRecoSts.h       |  2 +-
 reco/mq/CbmDevUnpack.h                |  8 ++++----
 reco/tasks/CbmTaskTofHitFinder.h      |  2 +-
 reco/tasks/CbmTaskUnpack.h            | 15 +++++++++++++--
 reco/tasks/CbmTaskUnpackXpu.h         |  4 ++--
 9 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt
index 6a3fef593e..539bbb90cd 100644
--- a/algo/CMakeLists.txt
+++ b/algo/CMakeLists.txt
@@ -58,20 +58,14 @@ add_custom_target(generateBuildInfo
 add_library(Algo SHARED ${SRCS})
 
 target_include_directories(Algo
-  PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
-         ${CMAKE_CURRENT_SOURCE_DIR}/data
+  PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/data
          ${CMAKE_CURRENT_SOURCE_DIR}/base
          ${CMAKE_CURRENT_SOURCE_DIR}/evbuild
          ${CMAKE_CURRENT_SOURCE_DIR}/global
          ${CMAKE_CURRENT_SOURCE_DIR}/trigger
          ${CMAKE_CURRENT_SOURCE_DIR}/evselector
          ${CMAKE_CURRENT_SOURCE_DIR}/unpack
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/sts
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/much
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/tof
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/bmon
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/trd
-         ${CMAKE_CURRENT_SOURCE_DIR}/detectors/trd2d
+         ${CMAKE_CURRENT_SOURCE_DIR}/detectors
  )
 
 target_link_libraries(Algo
diff --git a/algo/evselector/DigiEventSelector.cxx b/algo/evselector/DigiEventSelector.cxx
index 8eb4a8e1c2..e47bf8d516 100644
--- a/algo/evselector/DigiEventSelector.cxx
+++ b/algo/evselector/DigiEventSelector.cxx
@@ -6,7 +6,7 @@
 
 #include "CbmStsDigi.h"
 
-#include "TofConfig.h"
+#include "tof/TofConfig.h"
 
 #include <iterator>
 #include <map>
diff --git a/algo/global/Reco.h b/algo/global/Reco.h
index 9303d9c220..9d1bf89e73 100644
--- a/algo/global/Reco.h
+++ b/algo/global/Reco.h
@@ -6,9 +6,9 @@
 
 #include <xpu/host.h>
 
-#include "StsHitfinderChain.h"
-#include "StsUnpackChain.h"
 #include "SubChain.h"
+#include "sts/StsHitfinderChain.h"
+#include "sts/StsUnpackChain.h"
 
 namespace fles
 {
diff --git a/algo/test/_GTestDigiEventSelector.cxx b/algo/test/_GTestDigiEventSelector.cxx
index 8b528f6a93..77952b8080 100644
--- a/algo/test/_GTestDigiEventSelector.cxx
+++ b/algo/test/_GTestDigiEventSelector.cxx
@@ -2,7 +2,7 @@
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 
-#include "TofConfig.h"
+#include "tof/TofConfig.h"
 
 #include <unordered_set>
 
diff --git a/reco/detectors/sts/CbmRecoSts.h b/reco/detectors/sts/CbmRecoSts.h
index 0ba495c7d8..9cfa4e0178 100644
--- a/reco/detectors/sts/CbmRecoSts.h
+++ b/reco/detectors/sts/CbmRecoSts.h
@@ -16,7 +16,7 @@
 #include <TClonesArray.h>
 #include <TStopwatch.h>
 
-#include "StsHitfinderChain.h"
+#include "sts/StsHitfinderChain.h"
 
 class CbmDigiManager;
 class CbmEvent;
diff --git a/reco/mq/CbmDevUnpack.h b/reco/mq/CbmDevUnpack.h
index fb0fb2c0ca..2b9375ccf2 100644
--- a/reco/mq/CbmDevUnpack.h
+++ b/reco/mq/CbmDevUnpack.h
@@ -26,10 +26,10 @@
 #include <map>
 #include <vector>
 
-#include "MuchReadoutConfig.h"
-#include "StsReadoutConfigLegacy.h"
-#include "UnpackMuch.h"
-#include "UnpackSts.h"
+#include "much/MuchReadoutConfig.h"
+#include "much/UnpackMuch.h"
+#include "sts/StsReadoutConfigLegacy.h"
+#include "sts/UnpackSts.h"
 
 class TimesliceMetaData;
 class CbmDigiTimeslice;
diff --git a/reco/tasks/CbmTaskTofHitFinder.h b/reco/tasks/CbmTaskTofHitFinder.h
index e192587d49..77760c973c 100644
--- a/reco/tasks/CbmTaskTofHitFinder.h
+++ b/reco/tasks/CbmTaskTofHitFinder.h
@@ -23,7 +23,7 @@ class CbmTofCell;
 class CbmDigiManager;
 class CbmEvent;
 
-#include "HitFinderTof.h"
+#include "tof/HitFinderTof.h"
 
 // FAIR classes and includes
 #include "FairTask.h"
diff --git a/reco/tasks/CbmTaskUnpack.h b/reco/tasks/CbmTaskUnpack.h
index d4262eb6bb..697b517c8c 100644
--- a/reco/tasks/CbmTaskUnpack.h
+++ b/reco/tasks/CbmTaskUnpack.h
@@ -11,13 +11,24 @@
 
 #include <FairTask.h>
 
-#include "Trd2dReadoutConfig.h"
-#include "TrdReadoutConfig.h"
+#include "tof/TofReadoutConfig.h"
+#include "tof/UnpackTof.h"
+#include "trd/TrdReadoutConfig.h"
+#include "trd/UnpackTrd.h"
+#include "trd2d/Trd2dReadoutConfig.h"
+#include "trd2d/UnpackTrd2d.h"
 
 #include <sstream>
 #include <vector>
 
+#include "EventBuilder.h"
 #include "Unpack.h"
+#include "bmon/BmonReadoutConfig.h"
+#include "bmon/UnpackBmon.h"
+#include "much/MuchReadoutConfig.h"
+#include "much/UnpackMuch.h"
+#include "sts/StsReadoutConfigLegacy.h"
+#include "sts/UnpackSts.h"
 
 class CbmDigiManager;
 class CbmSourceTs;
diff --git a/reco/tasks/CbmTaskUnpackXpu.h b/reco/tasks/CbmTaskUnpackXpu.h
index 95045c7e24..4a99affee6 100644
--- a/reco/tasks/CbmTaskUnpackXpu.h
+++ b/reco/tasks/CbmTaskUnpackXpu.h
@@ -15,8 +15,8 @@
 #include <vector>
 
 #include "EventBuilder.h"
-#include "StsReadoutConfigLegacy.h"
-#include "UnpackStsXpu.h"
+#include "sts/StsReadoutConfigLegacy.h"
+#include "sts/UnpackStsXpu.h"
 
 
 class CbmDigiManager;
-- 
GitLab