From 75cb579e8d74f092f34b995d0718314472921e26 Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Fri, 29 Nov 2024 14:22:18 +0100
Subject: [PATCH 1/2] Moving cbm::algo::EnumDict to CbmUtility library as
 cbm::util::EnumDict; cleaning the CbmYamlInterface

---
 algo/CMakeLists.txt                           |  7 +++--
 algo/base/CMakeLists.txt                      |  1 -
 algo/base/Definitions.h                       | 20 ++++++-------
 algo/base/RecoParams.h                        | 11 ++++---
 algo/base/util/ProfilingLevel.h               |  2 +-
 algo/detectors/sts/HitfinderChain.cxx         |  2 +-
 algo/global/ParFiles.cxx                      |  2 +-
 algo/global/Reco.cxx                          |  2 +-
 algo/kfp/KfpV0FinderDefs.h                    |  4 +--
 algo/online/containers/CMakeLists.txt         | 17 +++++++++++
 algo/test/CMakeLists.txt                      |  1 -
 algo/unpack/CommonUnpacker.cxx                |  4 +--
 algo/unpack/CommonUnpacker.h                  |  4 +--
 core/CMakeLists.txt                           |  1 +
 .../test/_GTestPartitionedVector.cxx          |  4 +++
 core/qa/CMakeLists.txt                        |  1 -
 core/utility/CMakeLists.txt                   | 30 +++++++++++++++++++
 .../utility/CbmEnumDict.cxx                   |  4 +--
 .../EnumDict.h => core/utility/CbmEnumDict.h  | 20 ++++++-------
 {algo/base => core/utility}/yaml/BaseTypes.h  | 13 ++++++--
 .../base => core/utility}/yaml/CMakeLists.txt |  9 ++++--
 {algo/base => core/utility}/yaml/Property.h   |  2 --
 {algo/base => core/utility}/yaml/Yaml.h       | 15 +++++-----
 core/utility/yaml/test/CMakeLists.txt         | 17 +++++++++++
 .../utility/yaml}/test/_GTestYamlConfig.cxx   | 10 +++----
 25 files changed, 141 insertions(+), 62 deletions(-)
 delete mode 100644 algo/base/CMakeLists.txt
 create mode 100644 algo/online/containers/CMakeLists.txt
 create mode 100644 core/utility/CMakeLists.txt
 rename algo/base/util/EnumDict.cxx => core/utility/CbmEnumDict.cxx (85%)
 rename algo/base/util/EnumDict.h => core/utility/CbmEnumDict.h (87%)
 rename {algo/base => core/utility}/yaml/BaseTypes.h (91%)
 rename {algo/base => core/utility}/yaml/CMakeLists.txt (63%)
 rename {algo/base => core/utility}/yaml/Property.h (99%)
 rename {algo/base => core/utility}/yaml/Yaml.h (95%)
 create mode 100644 core/utility/yaml/test/CMakeLists.txt
 rename {algo => core/utility/yaml}/test/_GTestYamlConfig.cxx (82%)

diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt
index 9ab152e9aa..5f360a4b0d 100644
--- a/algo/CMakeLists.txt
+++ b/algo/CMakeLists.txt
@@ -87,7 +87,6 @@ set(SRCS
   base/compat/Algorithm.cxx
   base/util/MemoryLogger.cxx
   base/util/StlUtils.cxx
-  base/util/EnumDict.cxx
   base/util/TimingsFormat.cxx
   data/sts/HitfinderPars.cxx
   data/sts/LandauTable.cxx
@@ -225,6 +224,8 @@ target_include_directories(Algo
 
 target_link_libraries(Algo
   PUBLIC    OnlineData
+            CbmUtility
+            CbmYamlInterface
             OnlineContainers
             KfCore
             CaCore
@@ -243,7 +244,6 @@ target_link_libraries(Algo
             cppzmq
             poolstl
   PRIVATE   CbmKFParticleOnlineInterface
-  INTERFACE CbmYamlInterface
 )
 target_compile_definitions(Algo PUBLIC NO_ROOT)
 xpu_attach(Algo ${DEVICE_SRCS})
@@ -304,6 +304,8 @@ if (NOT CBM_ONLINE_STANDALONE)
 
   target_link_libraries(AlgoOffline
     PUBLIC    CbmData
+              CbmYamlInterface
+              CbmUtility
               CbmContainers
               KfCoreOffline
               CaCoreOffline
@@ -322,7 +324,6 @@ if (NOT CBM_ONLINE_STANDALONE)
               cppzmq
               poolstl
     PRIVATE   CbmKFParticleOnlineInterface
-    INTERFACE CbmYamlInterface
   )
   xpu_attach(AlgoOffline ${DEVICE_SRCS})
 
diff --git a/algo/base/CMakeLists.txt b/algo/base/CMakeLists.txt
deleted file mode 100644
index 93b295fe0a..0000000000
--- a/algo/base/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory(yaml)
diff --git a/algo/base/Definitions.h b/algo/base/Definitions.h
index c58e1db257..f1cd9f8aac 100644
--- a/algo/base/Definitions.h
+++ b/algo/base/Definitions.h
@@ -4,8 +4,8 @@
 #ifndef CBM_BASE_TYPES_H
 #define CBM_BASE_TYPES_H
 
+#include "CbmEnumDict.h"
 #include "MicrosliceDescriptor.hpp"  // For fles::Subsystem
-#include "util/EnumDict.h"
 
 #include <cstdint>
 
@@ -109,18 +109,18 @@ CBM_ENUM_DICT(fles::Subsystem,
 );
 
 CBM_ENUM_DICT(cbm::algo::Step,
-  {"Unpack", Step::Unpack},
-  {"DigiTrigger", Step::DigiTrigger},
-  {"LocalReco", Step::LocalReco},
-  {"Tracking", Step::Tracking}
+  {"Unpack", cbm::algo::Step::Unpack},
+  {"DigiTrigger", cbm::algo::Step::DigiTrigger},
+  {"LocalReco", cbm::algo::Step::LocalReco},
+  {"Tracking", cbm::algo::Step::Tracking}
 );
 
 CBM_ENUM_DICT(cbm::algo::RecoData,
-  {"DigiTimeslice", RecoData::DigiTimeslice},
-  {"DigiEvent", RecoData::DigiEvent},
-  {"Cluster", RecoData::Cluster},
-  {"Hit", RecoData::Hit},
-  {"Track", RecoData::Track}
+  {"DigiTimeslice", cbm::algo::RecoData::DigiTimeslice},
+  {"DigiEvent", cbm::algo::RecoData::DigiEvent},
+  {"Cluster", cbm::algo::RecoData::Cluster},
+  {"Hit", cbm::algo::RecoData::Hit},
+  {"Track", cbm::algo::RecoData::Track}
 );
 
 CBM_ENUM_DICT(cbm::algo::Setup,
diff --git a/algo/base/RecoParams.h b/algo/base/RecoParams.h
index db747f189c..c933c63de1 100644
--- a/algo/base/RecoParams.h
+++ b/algo/base/RecoParams.h
@@ -5,7 +5,6 @@
 #define CBM_ALGO_BASE_RECOPARAMS_H
 
 #include "Definitions.h"
-#include "util/EnumDict.h"
 #include "yaml/Property.h"
 #include "yaml/Yaml.h"
 
@@ -106,14 +105,14 @@ namespace cbm::algo
 CBM_YAML_EXTERN_DECL(cbm::algo::RecoParams);
 
 CBM_ENUM_DICT(cbm::algo::RecoParams::SortMode,
-  {"BlockSort", RecoParams::SortMode::BlockSort},
-  {"CUBSegmentedSort", RecoParams::SortMode::CUBSegmentedSort}
+  {"BlockSort", cbm::algo::RecoParams::SortMode::BlockSort},
+  {"CUBSegmentedSort", cbm::algo::RecoParams::SortMode::CUBSegmentedSort}
 );
 
 CBM_ENUM_DICT(cbm::algo::RecoParams::AllocationMode,
-  {"Auto", RecoParams::AllocationMode::Auto},
-  {"Static", RecoParams::AllocationMode::Static},
-  {"Dynamic", RecoParams::AllocationMode::Dynamic}
+  {"Auto", cbm::algo::RecoParams::AllocationMode::Auto},
+  {"Static", cbm::algo::RecoParams::AllocationMode::Static},
+  {"Dynamic", cbm::algo::RecoParams::AllocationMode::Dynamic}
 );
 
 #endif  // CBM_ALGO_BASE_RECOPARAMS_H
diff --git a/algo/base/util/ProfilingLevel.h b/algo/base/util/ProfilingLevel.h
index d358bd36c9..5d9469359e 100644
--- a/algo/base/util/ProfilingLevel.h
+++ b/algo/base/util/ProfilingLevel.h
@@ -4,7 +4,7 @@
 
 #pragma once
 
-#include "EnumDict.h"
+#include "CbmEnumDict.h"
 
 namespace cbm::algo
 {
diff --git a/algo/detectors/sts/HitfinderChain.cxx b/algo/detectors/sts/HitfinderChain.cxx
index 2b4a4324b1..5796cfa54b 100644
--- a/algo/detectors/sts/HitfinderChain.cxx
+++ b/algo/detectors/sts/HitfinderChain.cxx
@@ -32,7 +32,7 @@ void sts::HitfinderChain::SetParameters(const HitfinderChainPars& parameters)
 
   if (!memoryPars.IsDynamic() && !memoryPars.IsStatic()) {
     throw std::runtime_error(
-      fmt::format("STS Hitfinder Chain: Unknown allocation mode: {}", ToString(memoryPars.allocationMode)));
+      fmt::format("STS Hitfinder Chain: Unknown allocation mode: {}", util::ToString(memoryPars.allocationMode)));
   }
 
   if (memoryPars.IsStatic()) {
diff --git a/algo/global/ParFiles.cxx b/algo/global/ParFiles.cxx
index d27a3ad91a..c7d2e8199a 100644
--- a/algo/global/ParFiles.cxx
+++ b/algo/global/ParFiles.cxx
@@ -132,7 +132,7 @@ ParFiles::ParFiles(const cbm::RunDatabase& runDb)
       kfp.V0FinderConfig = "mcbm2025_02/kfp_lambda_v25a.yaml";
       break;
 
-    default: throw FatalError("Unknown setup: {}", ToString(setup));
+    default: throw FatalError("Unknown setup: {}", util::ToString(setup));
   }
 
   if (setup != Setup::mCBM2024_03) {  // NO alignment matrices, review of the parameters is needed
diff --git a/algo/global/Reco.cxx b/algo/global/Reco.cxx
index efc23dfbd6..03bc8a45a8 100644
--- a/algo/global/Reco.cxx
+++ b/algo/global/Reco.cxx
@@ -649,7 +649,7 @@ void Reco::QueueUnpackerMetricsDet(const UnpackMonitor<MSMonitor>& monitor)
     return;
   }
 
-  std::string_view det = ToString(monitor.system);
+  std::string_view det = util::ToString(monitor.system);
 
   auto MkKey = [&](std::string_view key) { return fmt::format("{}{}", key, Capitalize(det)); };
 
diff --git a/algo/kfp/KfpV0FinderDefs.h b/algo/kfp/KfpV0FinderDefs.h
index 7bd79ecdb1..5c1fd29adb 100644
--- a/algo/kfp/KfpV0FinderDefs.h
+++ b/algo/kfp/KfpV0FinderDefs.h
@@ -10,7 +10,7 @@
 #ifndef KfpV0FinderDefs_h
 #define KfpV0FinderDefs_h 1
 
-#include "util/EnumDict.h"
+#include "CbmEnumDict.h"
 
 #include <array>
 
@@ -69,7 +69,7 @@ namespace cbm::algo::kfp
   };
 }  // namespace cbm::algo::kfp
 
-namespace cbm::algo
+namespace cbm::util
 {
   CBM_ENUM_DICT(cbm::algo::kfp::ETrackPid, 
     {"Pip", cbm::algo::kfp::ETrackPid::Pip},
diff --git a/algo/online/containers/CMakeLists.txt b/algo/online/containers/CMakeLists.txt
new file mode 100644
index 0000000000..34a95ef9d3
--- /dev/null
+++ b/algo/online/containers/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Online version of libCbmContainers
+
+set(OFFLINE_CONTAINERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../core/containers)
+
+add_library(OnlineContainers INTERFACE)
+
+target_include_directories(OnlineContainers
+  INTERFACE ${OFFLINE_CONTAINERS_DIR}
+)
+
+target_compile_definitions(OnlineContainers INTERFACE NO_ROOT)
+
+target_link_libraries(OnlineContainers 
+  INTERFACE GSL
+)
+
+install(TARGETS OnlineContainers DESTINATION lib)
diff --git a/algo/test/CMakeLists.txt b/algo/test/CMakeLists.txt
index c03c2d8996..dbfcfa07a8 100644
--- a/algo/test/CMakeLists.txt
+++ b/algo/test/CMakeLists.txt
@@ -18,7 +18,6 @@ EndFunction()
 AddBasicTest(_GTestTimeClusterTrigger)
 AddBasicTest(_GTestEventBuilder)
 AddBasicTest(_GTestDigiEventSelector)
-AddBasicTest(_GTestYamlConfig)
 AddBasicTest(_GTestTrdClusterizer)
 AddBasicTest(_GTestChannelMapping)
 
diff --git a/algo/unpack/CommonUnpacker.cxx b/algo/unpack/CommonUnpacker.cxx
index d7cc52db07..ba737260e9 100644
--- a/algo/unpack/CommonUnpacker.cxx
+++ b/algo/unpack/CommonUnpacker.cxx
@@ -23,7 +23,7 @@ detail::MSData::MSData(const fles::Timeslice& ts, fles::Subsystem subsystem, gsl
 
     if (std::find(legalEqIds.begin(), legalEqIds.end(), componentId) == legalEqIds.end()) {
       L_(error) << "Invalid equipment id 0x" << std::hex << std::setw(4) << componentId << std::dec << " for subsystem "
-                << ToString(subsystem);
+                << util::ToString(subsystem);
       monitor.errInvalidEqId++;
       continue;
     }
@@ -36,5 +36,5 @@ detail::MSData::MSData(const fles::Timeslice& ts, fles::Subsystem subsystem, gsl
       msContent.push_back(ts.content(comp, mslice));
     }
   }
-  L_(debug) << "Found " << monitor.numMs << " microslices for subsystem " << ToString(subsystem);
+  L_(debug) << "Found " << monitor.numMs << " microslices for subsystem " << util::ToString(subsystem);
 }
diff --git a/algo/unpack/CommonUnpacker.h b/algo/unpack/CommonUnpacker.h
index 3db3952e78..3d644c1c9b 100644
--- a/algo/unpack/CommonUnpacker.h
+++ b/algo/unpack/CommonUnpacker.h
@@ -118,12 +118,12 @@ namespace cbm::algo
         if (algo == fAlgos.end()) {
           if (!Contains(legalEqIds, msDesc.eq_id)) {
             L_(error) << "Invalid equip id " << std::hex << int{msDesc.eq_id} << std::dec << " for subsystem "
-                      << ToString(subsystem);
+                      << util::ToString(subsystem);
             monitorOut.errInvalidEqId++;
           }
           else {
             L_(error) << "Invalid system version " << std::hex << int{msDesc.sys_ver} << std::dec << " for subsystem "
-                      << ToString(subsystem);
+                      << util::ToString(subsystem);
             monitorOut.errInvalidSysVer++;
           }
           continue;
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 8ba66dcf1d..df1544f16b 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -6,6 +6,7 @@ set(CBMBASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/base)
 add_subdirectory(containers)
 add_subdirectory(data)
 add_subdirectory(log)
+add_subdirectory(utility)
 
 # CbmRoot core for offline installation only
 if(NOT DEFINED CBM_ONLINE_STANDALONE)
diff --git a/core/containers/test/_GTestPartitionedVector.cxx b/core/containers/test/_GTestPartitionedVector.cxx
index e32fc4030a..fef0e05791 100644
--- a/core/containers/test/_GTestPartitionedVector.cxx
+++ b/core/containers/test/_GTestPartitionedVector.cxx
@@ -10,6 +10,10 @@ using cbm::PartitionedPODVector;
 using cbm::PartitionedVector;
 using cbm::PODAllocator;
 
+using cbm::PartitionedPODVector;
+using cbm::PartitionedVector;
+using cbm::PODAllocator;
+
 template<typename T>
 void EXPECT_CONTAINER_EQ(gsl::span<const T> a, std::vector<T> b)
 {
diff --git a/core/qa/CMakeLists.txt b/core/qa/CMakeLists.txt
index 9b022d7bb8..18f04ce3ab 100644
--- a/core/qa/CMakeLists.txt
+++ b/core/qa/CMakeLists.txt
@@ -2,7 +2,6 @@ set(INCLUDE_DIRECTORIES
   ${CMAKE_CURRENT_SOURCE_DIR}/checker
   ${CMAKE_CURRENT_SOURCE_DIR}/report
   ${CMAKE_CURRENT_SOURCE_DIR}
-  ${CMAKE_SOURCE_DIR}/algo/base  # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree
   )
 
 set(SRCS
diff --git a/core/utility/CMakeLists.txt b/core/utility/CMakeLists.txt
new file mode 100644
index 0000000000..8038245be2
--- /dev/null
+++ b/core/utility/CMakeLists.txt
@@ -0,0 +1,30 @@
+# A library for CBM common utilities. The utilities include generic functions and classes
+# to extend the STL and BOOST C++. The library is not a place for a detector- or analysis-specific
+# software.
+#
+add_subdirectory(yaml)
+
+set(SRCS 
+  CbmEnumDict.cxx
+)
+
+add_library(CbmUtility SHARED ${SRCS})
+
+target_include_directories(CbmUtility
+  PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+target_link_libraries(CbmUtility
+  PUBLIC GSL
+         fmt::fmt
+         xpu
+)
+
+install(TARGETS CbmUtility DESTINATION lib)
+
+install(
+  FILES 
+    CbmEnumDict.h
+  DESTINATION
+    include/
+)
diff --git a/algo/base/util/EnumDict.cxx b/core/utility/CbmEnumDict.cxx
similarity index 85%
rename from algo/base/util/EnumDict.cxx
rename to core/utility/CbmEnumDict.cxx
index a0ffd40f36..960d54df60 100644
--- a/algo/base/util/EnumDict.cxx
+++ b/core/utility/CbmEnumDict.cxx
@@ -1,11 +1,11 @@
 /* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
-#include "EnumDict.h"
+#include "CbmEnumDict.h"
 
 #include <sstream>
 
-void cbm::algo::detail::RaiseUnknownEntry(std::string_view str, const std::vector<std::string_view>& validEntries)
+void cbm::util::detail::RaiseUnknownEntry(std::string_view str, const std::vector<std::string_view>& validEntries)
 {
   std::ostringstream oss;
   oss << "Could not parse '" << str << "'. Valid entries are: ";
diff --git a/algo/base/util/EnumDict.h b/core/utility/CbmEnumDict.h
similarity index 87%
rename from algo/base/util/EnumDict.h
rename to core/utility/CbmEnumDict.h
index fde2d6d785..c60ab8a5a0 100644
--- a/algo/base/util/EnumDict.h
+++ b/core/utility/CbmEnumDict.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #ifndef CBM_ALGO_BASE_UTIL_SERIALIZABLEENUM_H
@@ -16,7 +16,7 @@
 #include <fmt/format.h>
 #include <xpu/defines.h>
 
-namespace cbm::algo
+namespace cbm::util
 {
   namespace detail
   {
@@ -68,7 +68,7 @@ namespace cbm::algo
     if (it == dict.end()) throw std::runtime_error(fmt::format("Entry {} for enum missing!", static_cast<int>(t)));
     return it->first;
   }
-}  // namespace cbm::algo
+}  // namespace cbm::util
 
 #if XPU_IS_CPU
 /**
@@ -97,9 +97,9 @@ namespace cbm::algo
    */
 #define CBM_ENUM_DICT(type, ...)                                                                                       \
   template<>                                                                                                           \
-  inline const cbm::algo::detail::EnumDict_t<type> cbm::algo::detail::EnumDict<type> = {__VA_ARGS__};                  \
+  inline const cbm::util::detail::EnumDict_t<type> cbm::util::detail::EnumDict<type> = {__VA_ARGS__};                  \
   template<>                                                                                                           \
-  struct cbm::algo::detail::EnumHasDict<type> : std::true_type {                                                       \
+  struct cbm::util::detail::EnumHasDict<type> : std::true_type {                                                       \
   }
 #else  // XPU_IS_CPU
 // Disable macro in GPU code, causes some issues with nvcc
@@ -110,22 +110,22 @@ namespace cbm::algo
 // Placed in global namespace to be found by ADL e.g. for std::ostream_iterator
 namespace std
 {
-  template<typename T, typename = std::enable_if_t<cbm::algo::detail::EnumHasDict_v<T>>>
+  template<typename T, typename = std::enable_if_t<cbm::util::detail::EnumHasDict_v<T>>>
   std::ostream& operator<<(std::ostream& os, T t)
   {
-    os << cbm::algo::ToString(t);
+    os << cbm::util::ToString(t);
     return os;
   }
 
-  template<typename T, typename = std::enable_if_t<cbm::algo::detail::EnumHasDict_v<T>>>
+  template<typename T, typename = std::enable_if_t<cbm::util::detail::EnumHasDict_v<T>>>
   std::istream& operator>>(std::istream& is, T& t)
   {
     std::string str;
     is >> str;
-    auto maybet = cbm::algo::FromString<T>(str);
+    auto maybet = cbm::util::FromString<T>(str);
 
     if (!maybet) {
-      cbm::algo::detail::RaiseUnknownEntry(str, cbm::algo::detail::ValidEntries<T>());
+      cbm::util::detail::RaiseUnknownEntry(str, cbm::util::detail::ValidEntries<T>());
     }
     t = *maybet;
 
diff --git a/algo/base/yaml/BaseTypes.h b/core/utility/yaml/BaseTypes.h
similarity index 91%
rename from algo/base/yaml/BaseTypes.h
rename to core/utility/yaml/BaseTypes.h
index 1743aace81..7127f5f0a8 100644
--- a/algo/base/yaml/BaseTypes.h
+++ b/core/utility/yaml/BaseTypes.h
@@ -5,8 +5,6 @@
 #define CBM_YAML_BASETYPES_H
 #pragma once
 
-#include "Definitions.h"
-
 #include <array>
 #include <map>
 #include <set>
@@ -17,6 +15,17 @@
 
 namespace cbm::algo::yaml
 {
+  // typealias for Rust-like fixed size integer types
+  using i8  = std::int8_t;
+  using u8  = std::uint8_t;
+  using i16 = std::int16_t;
+  using u16 = std::uint16_t;
+  using i32 = std::int32_t;
+  using u32 = std::uint32_t;
+  using i64 = std::int64_t;
+  using u64 = std::uint64_t;
+  using f32 = float;
+  using f64 = double;
 
   // clang-format off
   using FundamentalTypes = std::tuple< bool
diff --git a/algo/base/yaml/CMakeLists.txt b/core/utility/yaml/CMakeLists.txt
similarity index 63%
rename from algo/base/yaml/CMakeLists.txt
rename to core/utility/yaml/CMakeLists.txt
index 756401d832..fdd50d75e9 100644
--- a/algo/base/yaml/CMakeLists.txt
+++ b/core/utility/yaml/CMakeLists.txt
@@ -1,15 +1,20 @@
+if (NOT CBM_ONLINE_STANDALONE)
+  add_subdirectory(test)
+endif()
+
 set(INCLUDE_DIRECTORIES
-  ${CMAKE_SOURCE_DIR}/algo/base  # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree
+  ${CMAKE_SOURCE_DIR}/core/utility  # For inclusions like "yaml/Yaml.h"
 )
 
 add_library(CbmYamlInterface INTERFACE)
 
 target_include_directories(CbmYamlInterface
-  INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
+  INTERFACE ${INCLUDE_DIRECTORIES}
 )
 
 target_link_libraries(CbmYamlInterface
   INTERFACE GSL
+            CbmUtility
             xpu
             fmt::fmt
             external::yaml-cpp
diff --git a/algo/base/yaml/Property.h b/core/utility/yaml/Property.h
similarity index 99%
rename from algo/base/yaml/Property.h
rename to core/utility/yaml/Property.h
index 223a978542..95ef674408 100644
--- a/algo/base/yaml/Property.h
+++ b/core/utility/yaml/Property.h
@@ -5,8 +5,6 @@
 #define CBM_YAML_PROPERTY_H
 #pragma once
 
-#include "Definitions.h"
-
 #include <optional>
 #include <string_view>
 #include <tuple>
diff --git a/algo/base/yaml/Yaml.h b/core/utility/yaml/Yaml.h
similarity index 95%
rename from algo/base/yaml/Yaml.h
rename to core/utility/yaml/Yaml.h
index e5dfa3d33a..4054e99d42 100644
--- a/algo/base/yaml/Yaml.h
+++ b/core/utility/yaml/Yaml.h
@@ -5,12 +5,12 @@
 #define CBM_YAML_YAML_H
 #pragma once
 
-#include "Definitions.h"
-#include "compat/Filesystem.h"
-#include "util/EnumDict.h"
+#include "CbmEnumDict.h"
 #include "yaml/BaseTypes.h"
 #include "yaml/Property.h"
 
+#include <boost/filesystem.hpp>
+
 #include <sstream>
 #include <string_view>
 
@@ -19,6 +19,7 @@
 
 namespace cbm::algo::yaml
 {
+  namespace fs = boost::filesystem;
 
   template<typename T>
   T Read(const YAML::Node& node);
@@ -71,14 +72,14 @@ namespace cbm::algo::yaml
 #endif
     using Type = std::remove_cv_t<std::remove_reference_t<T>>;
 
-    static_assert(!IsEnum<T> || detail::EnumHasDict_v<T>, "Enum must have a dictionary to be deserializable");
+    static_assert(!IsEnum<T> || util::detail::EnumHasDict_v<T>, "Enum must have a dictionary to be deserializable");
 
     // TODO: error handling
     if constexpr (IsFundamental<Type>) {
       return node.as<Type>();
     }
     else if constexpr (IsEnum<Type>) {
-      std::optional<T> maybet = FromString<T>(node.as<std::string>());
+      std::optional<T> maybet = util::FromString<T>(node.as<std::string>());
       if (!maybet) {
         throw std::runtime_error(fmt::format("Invalid enum value: {}", node.as<std::string>()));
       }
@@ -207,7 +208,7 @@ namespace cbm::algo::yaml
     template<typename T>
     void DoDump(const T& object, YAML::Emitter& ss, std::optional<YAML::EMITTER_MANIP> formatEntries = {})
     {
-      static_assert(!IsEnum<T> || detail::EnumHasDict_v<T>, "Enum must have a dictionary");
+      static_assert(!IsEnum<T> || util::detail::EnumHasDict_v<T>, "Enum must have a dictionary");
 
       if constexpr (IsFundamental<T>) {
         // Take care that i8 and u8 are printed as integers not as characters
@@ -217,7 +218,7 @@ namespace cbm::algo::yaml
           ss << object;
       }
       else if constexpr (IsEnum<T>) {
-        ss << std::string{ToString<T>(object)};
+        ss << std::string{util::ToString<T>(object)};
       }
       else if constexpr (IsVector<T> || IsArray<T> || IsSet<T>) {
         ss << YAML::BeginSeq;
diff --git a/core/utility/yaml/test/CMakeLists.txt b/core/utility/yaml/test/CMakeLists.txt
new file mode 100644
index 0000000000..3af2e9aa42
--- /dev/null
+++ b/core/utility/yaml/test/CMakeLists.txt
@@ -0,0 +1,17 @@
+Function(AddBasicTest name)
+  set(PVT_DEPS
+    CbmYamlInterface
+    Gtest
+    GtestMain
+  )
+
+  add_executable(${name} ${name}.cxx)
+  target_link_libraries(${name} PUBLIC ${PVT_DEPS})
+  Add_Test(
+    NAME ${name}
+    COMMAND ${name}
+    WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+  )
+EndFunction()
+
+AddBasicTest(_GTestYamlConfig)
diff --git a/algo/test/_GTestYamlConfig.cxx b/core/utility/yaml/test/_GTestYamlConfig.cxx
similarity index 82%
rename from algo/test/_GTestYamlConfig.cxx
rename to core/utility/yaml/test/_GTestYamlConfig.cxx
index fd147efede..f84ec08901 100644
--- a/algo/test/_GTestYamlConfig.cxx
+++ b/core/utility/yaml/test/_GTestYamlConfig.cxx
@@ -6,7 +6,7 @@
 #include "yaml/Property.h"
 #include "yaml/Yaml.h"
 
-using namespace cbm::algo;
+using namespace cbm::algo::yaml;
 
 //
 // TODO: These tests are nowhere near exhaustive. Extend after the DC.
@@ -22,7 +22,7 @@ TEST(Config, CanDeserializeStdMap)
   ss << "5: 6\n";
 
   YAML::Node node = YAML::Load(ss.str());
-  auto map        = yaml::Read<Map_t>(node);
+  auto map        = Read<Map_t>(node);
 
   EXPECT_EQ(map.size(), 3);
   EXPECT_EQ(map.at(1), 2);
@@ -39,7 +39,7 @@ TEST(Config, CanSerializeStdMap)
   map[3] = 4;
   map[5] = 6;
 
-  YAML::Node node = YAML::Load(yaml::Dump{}(map));
+  YAML::Node node = YAML::Load(Dump{}(map));
 
   EXPECT_EQ(node.size(), 3);
   EXPECT_EQ(node[1].as<i32>(), 2);
@@ -56,7 +56,7 @@ class Foo {
   i32 GetBar() const { return fBar; }
   i32 GetBaz() const { return fBaz; }
 
-  CBM_YAML_PROPERTIES(yaml::Property(&Foo::fBar, "bar", ""), yaml::Property(&Foo::fBaz, "baz", ""));
+  CBM_YAML_PROPERTIES(Property(&Foo::fBar, "bar", ""), Property(&Foo::fBaz, "baz", ""));
 };
 
 TEST(Config, CanAccessPrivateMembers)
@@ -66,7 +66,7 @@ TEST(Config, CanAccessPrivateMembers)
   ss << "baz: 2\n";
 
   YAML::Node node = YAML::Load(ss.str());
-  auto foo        = yaml::Read<Foo>(node);
+  auto foo        = Read<Foo>(node);
 
   EXPECT_EQ(foo.GetBar(), 1);
   EXPECT_EQ(foo.GetBaz(), 2);
-- 
GitLab


From ca7e3a54e3ae6b723c3d8646059c11027b49a88c Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Mon, 2 Jun 2025 18:30:15 +0200
Subject: [PATCH 2/2] Merging CbmYamlInterface with CbmUtility; renaming
 yaml/Yaml.h -> CbmYaml.h

---
 algo/CMakeLists.txt                           |  3 --
 algo/base/RecoParams.h                        |  5 ++--
 algo/ca/TrackingChain.cxx                     |  2 +-
 algo/ca/TrackingChainConfig.h                 |  4 +--
 algo/data/sts/HitfinderPars.h                 |  5 ++--
 algo/detectors/bmon/CalibrateSetup.h          |  2 +-
 algo/detectors/bmon/HitfindSetup.h            |  2 +-
 algo/detectors/bmon/ReadoutConfig.h           |  5 ++--
 algo/detectors/sts/ChannelMaskSet.h           |  5 ++--
 algo/detectors/sts/ReadoutConfig.h            |  5 ++--
 algo/detectors/sts/WalkMap.h                  |  5 ++--
 algo/detectors/tof/CalibrateSetup.h           |  4 +--
 algo/detectors/tof/HitfindSetup.h             |  4 +--
 algo/detectors/tof/ReadoutConfig.h            |  5 ++--
 algo/detectors/trd/Hitfind2DSetup.h           |  4 +--
 algo/detectors/trd/HitfindSetup.h             |  4 +--
 algo/detectors/trd/ReadoutConfig.h            |  5 ++--
 algo/detectors/trd2d/ReadoutConfig.h          |  3 +-
 algo/global/Reco.cxx                          |  2 +-
 algo/kfp/KfpV0FinderChain.cxx                 |  2 +-
 algo/kfp/KfpV0FinderConfig.h                  |  2 +-
 algo/kfp/KfpV0FinderCutter.h                  |  2 +-
 algo/online/containers/CMakeLists.txt         | 17 -----------
 core/qa/CMakeLists.txt                        |  2 +-
 core/qa/CbmQaIO.h                             |  7 ++---
 core/run/CbmRunDatabase.h                     | 14 +++++-----
 core/utility/CMakeLists.txt                   |  7 ++++-
 core/utility/yaml/CMakeLists.txt              | 27 ------------------
 core/utility/yaml/{Yaml.h => CbmYaml.h}       | 23 +++++++++------
 .../yaml/{BaseTypes.h => CbmYamlBaseTypes.h}  |  6 ++--
 .../yaml/{Property.h => CbmYamlProperty.h}    |  6 ++--
 core/utility/yaml/test/CMakeLists.txt         |  3 +-
 core/utility/yaml/test/_GTestYamlConfig.cxx   |  7 ++---
 reco/KF/CbmKFV0FinderTask.cxx                 |  2 +-
 reco/KF/KFParticleInterface.cmake             |  2 +-
 reco/L1/CMakeLists.txt                        |  5 +---
 .../CbmGenerateMaterialMaps.h                 | 28 +++++++++----------
 reco/tasks/CMakeLists.txt                     |  1 -
 reco/tasks/CbmTaskStsHitFinderParWrite.cxx    |  4 +--
 reco/tasks/CbmTaskTofClusterizer.cxx          |  4 +--
 reco/tasks/CbmTaskTofClusterizerParWrite.cxx  |  4 +--
 reco/tasks/CbmTaskTrdHitFinder.cxx            |  4 +--
 reco/tasks/CbmTaskTrdHitFinderParWrite.cxx    |  4 +--
 reco/tasks/CbmTaskTrdUnpackParWrite.cxx       |  4 +--
 reco/tasks/CbmTaskUnpack.cxx                  |  4 +--
 45 files changed, 107 insertions(+), 158 deletions(-)
 delete mode 100644 algo/online/containers/CMakeLists.txt
 rename core/utility/yaml/{Yaml.h => CbmYaml.h} (94%)
 rename core/utility/yaml/{BaseTypes.h => CbmYamlBaseTypes.h} (96%)
 rename core/utility/yaml/{Property.h => CbmYamlProperty.h} (95%)

diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt
index 5f360a4b0d..e43a2ab44f 100644
--- a/algo/CMakeLists.txt
+++ b/algo/CMakeLists.txt
@@ -53,7 +53,6 @@ if (CBM_ONLINE_STANDALONE)
   add_subdirectory(../core core)
 endif()
 
-add_subdirectory(base)
 add_subdirectory(ca)
 add_subdirectory(kf)
 add_subdirectory(kfp)
@@ -225,7 +224,6 @@ target_include_directories(Algo
 target_link_libraries(Algo
   PUBLIC    OnlineData
             CbmUtility
-            CbmYamlInterface
             OnlineContainers
             KfCore
             CaCore
@@ -304,7 +302,6 @@ if (NOT CBM_ONLINE_STANDALONE)
 
   target_link_libraries(AlgoOffline
     PUBLIC    CbmData
-              CbmYamlInterface
               CbmUtility
               CbmContainers
               KfCoreOffline
diff --git a/algo/base/RecoParams.h b/algo/base/RecoParams.h
index c933c63de1..3ffe7130b5 100644
--- a/algo/base/RecoParams.h
+++ b/algo/base/RecoParams.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #ifndef CBM_ALGO_BASE_RECOPARAMS_H
 #define CBM_ALGO_BASE_RECOPARAMS_H
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <xpu/defines.h>
 
diff --git a/algo/ca/TrackingChain.cxx b/algo/ca/TrackingChain.cxx
index d33ccb042e..2f1202d14c 100644
--- a/algo/ca/TrackingChain.cxx
+++ b/algo/ca/TrackingChain.cxx
@@ -13,10 +13,10 @@
 #include "CaHit.h"
 #include "CaInitManager.h"
 #include "CaParameters.h"
+#include "CbmYaml.h"
 #include "KfSetupBuilder.h"
 #include "ParFiles.h"
 #include "compat/OpenMP.h"
-#include "yaml/Yaml.h"
 
 #include <boost/archive/binary_oarchive.hpp>
 
diff --git a/algo/ca/TrackingChainConfig.h b/algo/ca/TrackingChainConfig.h
index 5c16837f15..d32b15c7b4 100644
--- a/algo/ca/TrackingChainConfig.h
+++ b/algo/ca/TrackingChainConfig.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2024-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -9,7 +9,7 @@
 
 #pragma once
 
-#include "yaml/Property.h"
+#include "CbmYaml.h"
 
 #include <string>
 #include <tuple>
diff --git a/algo/data/sts/HitfinderPars.h b/algo/data/sts/HitfinderPars.h
index 3e58fa30e0..e0923d771b 100644
--- a/algo/data/sts/HitfinderPars.h
+++ b/algo/data/sts/HitfinderPars.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
 #include "LandauTable.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <xpu/defines.h>
 
diff --git a/algo/detectors/bmon/CalibrateSetup.h b/algo/detectors/bmon/CalibrateSetup.h
index 975175a10e..1baea39581 100644
--- a/algo/detectors/bmon/CalibrateSetup.h
+++ b/algo/detectors/bmon/CalibrateSetup.h
@@ -9,8 +9,8 @@
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <array>
 #include <map>
diff --git a/algo/detectors/bmon/HitfindSetup.h b/algo/detectors/bmon/HitfindSetup.h
index 96431fb026..c93559ccd6 100644
--- a/algo/detectors/bmon/HitfindSetup.h
+++ b/algo/detectors/bmon/HitfindSetup.h
@@ -9,8 +9,8 @@
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <string>
 #include <vector>
diff --git a/algo/detectors/bmon/ReadoutConfig.h b/algo/detectors/bmon/ReadoutConfig.h
index 88e0361d38..3bfc76f0c3 100644
--- a/algo/detectors/bmon/ReadoutConfig.h
+++ b/algo/detectors/bmon/ReadoutConfig.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <cstddef>
 #include <cstdint>
diff --git a/algo/detectors/sts/ChannelMaskSet.h b/algo/detectors/sts/ChannelMaskSet.h
index bc0c0b83ad..8a7757158b 100644
--- a/algo/detectors/sts/ChannelMaskSet.h
+++ b/algo/detectors/sts/ChannelMaskSet.h
@@ -1,13 +1,12 @@
-/* Copyright (C) 2024 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2024-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer], Dominik Smith */
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
 #include "compat/Filesystem.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <map>
 #include <set>
diff --git a/algo/detectors/sts/ReadoutConfig.h b/algo/detectors/sts/ReadoutConfig.h
index b3db24c219..caf5e9d7b3 100644
--- a/algo/detectors/sts/ReadoutConfig.h
+++ b/algo/detectors/sts/ReadoutConfig.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Volker Friese [committer], Felix Weiglhofer */
 #ifndef CBM_ALGO_DETECTOR_STS_READOUT_CONFIG_H
 #define CBM_ALGO_DETECTOR_STS_READOUT_CONFIG_H
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <map>
 #include <string>
diff --git a/algo/detectors/sts/WalkMap.h b/algo/detectors/sts/WalkMap.h
index 57a23d54a0..aa7659840c 100644
--- a/algo/detectors/sts/WalkMap.h
+++ b/algo/detectors/sts/WalkMap.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2024 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2024-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer], Dominik Smith */
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <map>
 #include <vector>
diff --git a/algo/detectors/tof/CalibrateSetup.h b/algo/detectors/tof/CalibrateSetup.h
index 89d806312b..6cdfdc00db 100644
--- a/algo/detectors/tof/CalibrateSetup.h
+++ b/algo/detectors/tof/CalibrateSetup.h
@@ -1,11 +1,11 @@
-/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2023-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 #ifndef CBM_ALGO_DETECTOR_TOF_CALIBRATE_SETUP_H
 #define CBM_ALGO_DETECTOR_TOF_CALIBRATE_SETUP_H
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <array>
 #include <map>
diff --git a/algo/detectors/tof/HitfindSetup.h b/algo/detectors/tof/HitfindSetup.h
index c3138ad7d3..eff6f81d38 100644
--- a/algo/detectors/tof/HitfindSetup.h
+++ b/algo/detectors/tof/HitfindSetup.h
@@ -1,11 +1,11 @@
-/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2023-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 #ifndef CBM_ALGO_DETECTOR_TOF_HITFIND_SETUP_H
 #define CBM_ALGO_DETECTOR_TOF_HITFIND_SETUP_H
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <array>
 #include <map>
diff --git a/algo/detectors/tof/ReadoutConfig.h b/algo/detectors/tof/ReadoutConfig.h
index 6b9ac632fa..250e288bc6 100644
--- a/algo/detectors/tof/ReadoutConfig.h
+++ b/algo/detectors/tof/ReadoutConfig.h
@@ -1,12 +1,11 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <cstddef>
 #include <cstdint>
diff --git a/algo/detectors/trd/Hitfind2DSetup.h b/algo/detectors/trd/Hitfind2DSetup.h
index a045abbc75..d4bbffdb9a 100644
--- a/algo/detectors/trd/Hitfind2DSetup.h
+++ b/algo/detectors/trd/Hitfind2DSetup.h
@@ -1,10 +1,10 @@
-/* Copyright (C) 2024 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2024-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <array>
 #include <map>
diff --git a/algo/detectors/trd/HitfindSetup.h b/algo/detectors/trd/HitfindSetup.h
index 68214432c7..b702eda4ff 100644
--- a/algo/detectors/trd/HitfindSetup.h
+++ b/algo/detectors/trd/HitfindSetup.h
@@ -1,10 +1,10 @@
-/* Copyright (C) 2024 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2024-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer] */
 #pragma once
 
+#include "CbmYaml.h"
 #include "Definitions.h"
-#include "yaml/Property.h"
 
 #include <array>
 #include <map>
diff --git a/algo/detectors/trd/ReadoutConfig.h b/algo/detectors/trd/ReadoutConfig.h
index 17160f0a3f..9a1edb8028 100644
--- a/algo/detectors/trd/ReadoutConfig.h
+++ b/algo/detectors/trd/ReadoutConfig.h
@@ -1,11 +1,10 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Volker Friese [committer] */
 
 #pragma once
 
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
+#include "CbmYaml.h"
 
 #include <map>
 #include <sstream>
diff --git a/algo/detectors/trd2d/ReadoutConfig.h b/algo/detectors/trd2d/ReadoutConfig.h
index 673b55f876..516aa62283 100644
--- a/algo/detectors/trd2d/ReadoutConfig.h
+++ b/algo/detectors/trd2d/ReadoutConfig.h
@@ -4,9 +4,8 @@
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "UnpackMS.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <map>
 #include <sstream>
diff --git a/algo/global/Reco.cxx b/algo/global/Reco.cxx
index 03bc8a45a8..d02e257c8b 100644
--- a/algo/global/Reco.cxx
+++ b/algo/global/Reco.cxx
@@ -8,6 +8,7 @@
 #include "BuildInfo.h"
 #include "CbmDigiEvent.h"
 #include "CbmRunDatabase.h"
+#include "CbmYaml.h"
 #include "EventbuildChain.h"
 #include "Exceptions.h"
 #include "HistogramSender.h"
@@ -40,7 +41,6 @@
 #include "trd2d/Unpack.h"
 #include "util/TimingsFormat.h"
 #include "util/TsUtils.h"
-#include "yaml/Yaml.h"
 
 #include <Monitor.hpp>
 #include <System.hpp>
diff --git a/algo/kfp/KfpV0FinderChain.cxx b/algo/kfp/KfpV0FinderChain.cxx
index fd8b556e92..a6e60ce770 100644
--- a/algo/kfp/KfpV0FinderChain.cxx
+++ b/algo/kfp/KfpV0FinderChain.cxx
@@ -10,9 +10,9 @@
 #include "kfp/KfpV0FinderChain.h"
 
 #include "AlgoFairloggerCompat.h"
+#include "CbmYaml.h"
 #include "global/ParFiles.h"
 #include "kfp/KfpV0FinderConfig.h"
-#include "yaml/Yaml.h"
 
 #include <sstream>
 
diff --git a/algo/kfp/KfpV0FinderConfig.h b/algo/kfp/KfpV0FinderConfig.h
index 4bd992e0cb..f21fb77cb2 100644
--- a/algo/kfp/KfpV0FinderConfig.h
+++ b/algo/kfp/KfpV0FinderConfig.h
@@ -9,7 +9,7 @@
 
 #pragma once
 
-#include "yaml/Yaml.h"
+#include "CbmYaml.h"
 
 #include <string>
 #include <vector>
diff --git a/algo/kfp/KfpV0FinderCutter.h b/algo/kfp/KfpV0FinderCutter.h
index 597121d950..cf9da88468 100644
--- a/algo/kfp/KfpV0FinderCutter.h
+++ b/algo/kfp/KfpV0FinderCutter.h
@@ -10,8 +10,8 @@
 #ifndef KfpV0FinderCutter_h
 #define KfpV0FinderCutter_h 0
 
+#include "CbmYaml.h"
 #include "kfp/KfpV0FinderDefs.h"
-#include "yaml/Yaml.h"
 
 #include <array>
 #include <string>
diff --git a/algo/online/containers/CMakeLists.txt b/algo/online/containers/CMakeLists.txt
deleted file mode 100644
index 34a95ef9d3..0000000000
--- a/algo/online/containers/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Online version of libCbmContainers
-
-set(OFFLINE_CONTAINERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../core/containers)
-
-add_library(OnlineContainers INTERFACE)
-
-target_include_directories(OnlineContainers
-  INTERFACE ${OFFLINE_CONTAINERS_DIR}
-)
-
-target_compile_definitions(OnlineContainers INTERFACE NO_ROOT)
-
-target_link_libraries(OnlineContainers 
-  INTERFACE GSL
-)
-
-install(TARGETS OnlineContainers DESTINATION lib)
diff --git a/core/qa/CMakeLists.txt b/core/qa/CMakeLists.txt
index 18f04ce3ab..fd2f546b0f 100644
--- a/core/qa/CMakeLists.txt
+++ b/core/qa/CMakeLists.txt
@@ -46,6 +46,7 @@ set(LIBRARY_NAME CbmQaBase)
 set(LINKDEF ${LIBRARY_NAME}LinkDef.h)
 set(PUBLIC_DEPENDENCIES
   AlgoOffline
+  CbmUtility
   FairRoot::Base
   FairLogger::FairLogger
   external::yaml-cpp
@@ -63,7 +64,6 @@ set(PRIVATE_DEPENDENCIES
 
 set(INTERFACE_DEPENDENCIES
   ROOT::Graf
-  CbmYamlInterface
   )
 
 generate_cbm_library()
diff --git a/core/qa/CbmQaIO.h b/core/qa/CbmQaIO.h
index 274fd67191..2b5e585643 100644
--- a/core/qa/CbmQaIO.h
+++ b/core/qa/CbmQaIO.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2023-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -13,6 +13,7 @@
 #include "CbmQaCanvas.h"
 #include "CbmQaEff.h"
 #include "CbmQaTable.h"
+#include "CbmYaml.h"
 #include "Logger.h"
 #include "TCanvas.h"
 #include "TEfficiency.h"
@@ -26,8 +27,6 @@
 #include "TProfile3D.h"
 #include "TROOT.h"
 #include "TString.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
 #include <limits>
 #include <optional>
@@ -129,7 +128,7 @@ class CbmQaIO {
     std::optional<Config> res = std::nullopt;
     const auto& node          = fConfigNode["specific"];
     if (node) {
-      res = std::make_optional(cbm::algo::yaml::Read<Config>(node));
+      res = std::make_optional(cbm::util::yaml::Read<Config>(node));
     }
     return res;
   }
diff --git a/core/run/CbmRunDatabase.h b/core/run/CbmRunDatabase.h
index df22027af5..d4e4b625d7 100644
--- a/core/run/CbmRunDatabase.h
+++ b/core/run/CbmRunDatabase.h
@@ -16,7 +16,7 @@
 #ifndef CbmRunDatabase_h
 #define CbmRunDatabase_h 1
 
-#include "yaml/Yaml.h"
+#include "CbmYaml.h"
 
 #include <map>
 #include <string>
@@ -32,7 +32,7 @@ namespace cbm
       std::map<uint32_t, std::string> geoSetup;  ///< geometry setup tag
 
       CBM_YAML_PROPERTIES(
-        algo::yaml::Property(&RunDatabase::DbCommon::geoSetup,  "geoSetup", "Run ID map for geometry setup tags"));
+        util::yaml::Property(&RunDatabase::DbCommon::geoSetup,  "geoSetup", "Run ID map for geometry setup tags"));
     };
 
     /// \struct  DbCalibration
@@ -42,8 +42,8 @@ namespace cbm
       std::map<uint32_t, std::string> tof;   ///< TOF calibration tag
 
       CBM_YAML_PROPERTIES(
-        algo::yaml::Property(&RunDatabase::DbCalibration::bmon, "bmon", "Run ID map for BMON calibration tags"),
-        algo::yaml::Property(&RunDatabase::DbCalibration::tof,  "tof", "Run ID map for TOF calibration tags"));
+        util::yaml::Property(&RunDatabase::DbCalibration::bmon, "bmon", "Run ID map for BMON calibration tags"),
+        util::yaml::Property(&RunDatabase::DbCalibration::tof,  "tof", "Run ID map for TOF calibration tags"));
     };
 
     /// \struct  DbContents
@@ -54,9 +54,9 @@ namespace cbm
       std::map<uint32_t, std::string> alignment;  ///< Alignment tags
 
       CBM_YAML_PROPERTIES(
-        algo::yaml::Property(&RunDatabase::DbContents::common, "common", "Common parameters"),
-        algo::yaml::Property(&RunDatabase::DbContents::calibration, "calibration", "Calibration of detector subsystems"),
-        algo::yaml::Property(&RunDatabase::DbContents::alignment, "alignment", "Alignment matrices tag"));
+        util::yaml::Property(&RunDatabase::DbContents::common, "common", "Common parameters"),
+        util::yaml::Property(&RunDatabase::DbContents::calibration, "calibration", "Calibration of detector subsystems"),
+        util::yaml::Property(&RunDatabase::DbContents::alignment, "alignment", "Alignment matrices tag"));
     };
 
    public:
diff --git a/core/utility/CMakeLists.txt b/core/utility/CMakeLists.txt
index 8038245be2..29d72e315c 100644
--- a/core/utility/CMakeLists.txt
+++ b/core/utility/CMakeLists.txt
@@ -12,19 +12,24 @@ add_library(CbmUtility SHARED ${SRCS})
 
 target_include_directories(CbmUtility
   PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+         ${CMAKE_CURRENT_SOURCE_DIR}/yaml
 )
 
 target_link_libraries(CbmUtility
   PUBLIC GSL
          fmt::fmt
          xpu
+         external::yaml-cpp
 )
 
 install(TARGETS CbmUtility DESTINATION lib)
 
 install(
-  FILES 
+  FILES
     CbmEnumDict.h
+    yaml/CbmYaml.h
+    yaml/CbmYamlBaseTypes.h 
+    yaml/CbmYamlProperty.h 
   DESTINATION
     include/
 )
diff --git a/core/utility/yaml/CMakeLists.txt b/core/utility/yaml/CMakeLists.txt
index fdd50d75e9..41fd9e08c3 100644
--- a/core/utility/yaml/CMakeLists.txt
+++ b/core/utility/yaml/CMakeLists.txt
@@ -1,30 +1,3 @@
 if (NOT CBM_ONLINE_STANDALONE)
   add_subdirectory(test)
 endif()
-
-set(INCLUDE_DIRECTORIES
-  ${CMAKE_SOURCE_DIR}/core/utility  # For inclusions like "yaml/Yaml.h"
-)
-
-add_library(CbmYamlInterface INTERFACE)
-
-target_include_directories(CbmYamlInterface
-  INTERFACE ${INCLUDE_DIRECTORIES}
-)
-
-target_link_libraries(CbmYamlInterface
-  INTERFACE GSL
-            CbmUtility
-            xpu
-            fmt::fmt
-            external::yaml-cpp
-)
-
-install(
-  FILES
-    BaseTypes.h
-    Property.h
-    Yaml.h
-  DESTINATION
-    include/yaml/
-)
diff --git a/core/utility/yaml/Yaml.h b/core/utility/yaml/CbmYaml.h
similarity index 94%
rename from core/utility/yaml/Yaml.h
rename to core/utility/yaml/CbmYaml.h
index 4054e99d42..b8fb5d2e42 100644
--- a/core/utility/yaml/Yaml.h
+++ b/core/utility/yaml/CbmYaml.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #ifndef CBM_YAML_YAML_H
@@ -6,8 +6,8 @@
 #pragma once
 
 #include "CbmEnumDict.h"
-#include "yaml/BaseTypes.h"
-#include "yaml/Property.h"
+#include "CbmYamlBaseTypes.h"
+#include "CbmYamlProperty.h"
 
 #include <boost/filesystem.hpp>
 
@@ -17,7 +17,7 @@
 #include <fmt/format.h>
 #include <yaml-cpp/yaml.h>
 
-namespace cbm::algo::yaml
+namespace cbm::util::yaml
 {
   namespace fs = boost::filesystem;
 
@@ -289,7 +289,7 @@ namespace cbm::algo::yaml
     }
   };
 
-}  // namespace cbm::algo::yaml
+}  // namespace cbm::util::yaml
 
 /**
  * @brief Declare the external instantiation of the Read and Dump functions for a type.
@@ -298,15 +298,20 @@ namespace cbm::algo::yaml
  * Must be paired with CBM_YAML_INSTANTIATE in a source file.
  **/
 #define CBM_YAML_EXTERN_DECL(type)                                                                                     \
-  extern template type cbm::algo::yaml::Read<type>(const YAML::Node& node);                                            \
-  extern template std::string cbm::algo::yaml::Dump::operator()<type>(const type& value, int floatPrecision)
+  extern template type cbm::util::yaml::Read<type>(const YAML::Node& node);                                            \
+  extern template std::string cbm::util::yaml::Dump::operator()<type>(const type& value, int floatPrecision)
 
 /**
  * @brief Explicitly instantiate the Read and Dump functions for a type.
  * @see CBM_YAML_EXTERN_DECL
  */
 #define CBM_YAML_INSTANTIATE(type)                                                                                     \
-  template type cbm::algo::yaml::Read<type>(const YAML::Node& node);                                                   \
-  template std::string cbm::algo::yaml::Dump::operator()<type>(const type& value, int floatPrecision);
+  template type cbm::util::yaml::Read<type>(const YAML::Node& node);                                                   \
+  template std::string cbm::util::yaml::Dump::operator()<type>(const type& value, int floatPrecision);
+
+namespace cbm::algo
+{
+  namespace yaml = util::yaml;  ///< For backward compatibility
+};
 
 #endif  // CBM_YAML_YAML_H
diff --git a/core/utility/yaml/BaseTypes.h b/core/utility/yaml/CbmYamlBaseTypes.h
similarity index 96%
rename from core/utility/yaml/BaseTypes.h
rename to core/utility/yaml/CbmYamlBaseTypes.h
index 7127f5f0a8..b8c8da820e 100644
--- a/core/utility/yaml/BaseTypes.h
+++ b/core/utility/yaml/CbmYamlBaseTypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #ifndef CBM_YAML_BASETYPES_H
@@ -13,7 +13,7 @@
 #include <unordered_set>
 #include <vector>
 
-namespace cbm::algo::yaml
+namespace cbm::util::yaml
 {
   // typealias for Rust-like fixed size integer types
   using i8  = std::int8_t;
@@ -149,5 +149,5 @@ namespace cbm::algo::yaml
   constexpr bool IsSet = is_std_set<T>::value || is_std_unordered_set<T>::value;
 
 
-}  // namespace cbm::algo::yaml
+}  // namespace cbm::util::yaml
 #endif  // CBM_YAML_BASETYPES_H
diff --git a/core/utility/yaml/Property.h b/core/utility/yaml/CbmYamlProperty.h
similarity index 95%
rename from core/utility/yaml/Property.h
rename to core/utility/yaml/CbmYamlProperty.h
index 95ef674408..9cec645220 100644
--- a/core/utility/yaml/Property.h
+++ b/core/utility/yaml/CbmYamlProperty.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 #ifndef CBM_YAML_PROPERTY_H
@@ -11,7 +11,7 @@
 
 #include <yaml-cpp/emittermanip.h>
 
-namespace cbm::algo::yaml
+namespace cbm::util::yaml
 {
 
   template<typename Class, typename T>
@@ -60,7 +60,7 @@ namespace cbm::algo::yaml
   template<typename Class, typename T>
   Property(T Class::*member, std::string_view key, std::string_view description) -> Property<Class, T>;
 
-}  // namespace cbm::algo::yaml
+}  // namespace cbm::util::yaml
 
 #define CBM_YAML_PROPERTIES(...)                                                                                       \
  public:                                                                                                               \
diff --git a/core/utility/yaml/test/CMakeLists.txt b/core/utility/yaml/test/CMakeLists.txt
index 3af2e9aa42..8ad5d4b1d6 100644
--- a/core/utility/yaml/test/CMakeLists.txt
+++ b/core/utility/yaml/test/CMakeLists.txt
@@ -1,8 +1,9 @@
 Function(AddBasicTest name)
   set(PVT_DEPS
-    CbmYamlInterface
+    CbmUtility
     Gtest
     GtestMain
+    pthread
   )
 
   add_executable(${name} ${name}.cxx)
diff --git a/core/utility/yaml/test/_GTestYamlConfig.cxx b/core/utility/yaml/test/_GTestYamlConfig.cxx
index f84ec08901..4d3daaedec 100644
--- a/core/utility/yaml/test/_GTestYamlConfig.cxx
+++ b/core/utility/yaml/test/_GTestYamlConfig.cxx
@@ -1,12 +1,11 @@
-/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 
+#include "CbmYaml.h"
 #include "gtest/gtest.h"
-#include "yaml/Property.h"
-#include "yaml/Yaml.h"
 
-using namespace cbm::algo::yaml;
+using namespace cbm::util::yaml;
 
 //
 // TODO: These tests are nowhere near exhaustive. Extend after the DC.
diff --git a/reco/KF/CbmKFV0FinderTask.cxx b/reco/KF/CbmKFV0FinderTask.cxx
index d455da2f3f..69d8dedf61 100644
--- a/reco/KF/CbmKFV0FinderTask.cxx
+++ b/reco/KF/CbmKFV0FinderTask.cxx
@@ -20,6 +20,7 @@
 #include "CbmTofTrack.h"
 #include "CbmTrdHit.h"
 #include "CbmTrdTrack.h"
+#include "CbmYaml.h"
 #include "FairRunAna.h"
 #include "KFPTrackVector.h"
 #include "KFVertex.h"
@@ -28,7 +29,6 @@
 #include "TMatrixTSym.h"
 #include "kfp/KfpV0FinderConfig.h"
 #include "kfp/KfpV0FinderCutter.h"
-#include "yaml/Yaml.h"
 
 #include <boost/filesystem.hpp>
 
diff --git a/reco/KF/KFParticleInterface.cmake b/reco/KF/KFParticleInterface.cmake
index 24e7b0874f..f6368ee6de 100644
--- a/reco/KF/KFParticleInterface.cmake
+++ b/reco/KF/KFParticleInterface.cmake
@@ -57,6 +57,7 @@ Set(LIBRARY_NAME KFParticleInterface)
 set(LINKDEF ${LIBRARY_NAME}LinkDef.h)
 set(PUBLIC_DEPENDENCIES
   CbmData
+  CbmUtility
   KF
   FairRoot::Base
   ROOT::Core
@@ -78,7 +79,6 @@ set(PRIVATE_DEPENDENCIES
 
 set(INTERFACE_DEPENDENCIES
   CbmRecoBase
-  CbmYamlInterface
   )
 
 Set(DEFINITIONS -DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS)
diff --git a/reco/L1/CMakeLists.txt b/reco/L1/CMakeLists.txt
index 4e0573c8d4..d151261760 100644
--- a/reco/L1/CMakeLists.txt
+++ b/reco/L1/CMakeLists.txt
@@ -143,6 +143,7 @@ set(PUBLIC_DEPENDENCIES
   CbmStsBase
   CbmTofBase
   CbmTrdBase
+  CbmUtility
   CaCoreOffline
   KfCbm
   CbmBase
@@ -175,10 +176,6 @@ set(PRIVATE_DEPENDENCIES
   ROOT::RIO
 )
 
-set(INTERFACE_DEPENDENCIES
-  CbmYamlInterface
-)
-
 generate_cbm_library()
 
 add_dependencies(G__L1 KFPARTICLE)
diff --git a/reco/L1/OffLineInterface/CbmGenerateMaterialMaps.h b/reco/L1/OffLineInterface/CbmGenerateMaterialMaps.h
index 1bb05bfc71..c60cb81e99 100644
--- a/reco/L1/OffLineInterface/CbmGenerateMaterialMaps.h
+++ b/reco/L1/OffLineInterface/CbmGenerateMaterialMaps.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2024-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -9,10 +9,10 @@
 
 #pragma once
 
+#include "CbmYaml.h"
 #include "FairTask.h"
 #include "KfMaterialMap.h"
 #include "KfMaterialMapFactory.h"
-#include "yaml/Yaml.h"
 
 #include <map>
 #include <string>
@@ -36,11 +36,11 @@ class CbmGenerateMaterialMaps : public FairTask {
 
     bool operator<(const MaterialSlice& r) const { return (fRefZ < r.fRefZ); }
 
-    CBM_YAML_PROPERTIES(cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fName, "name", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fRefZ, "ref_z", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMinZ, "min_z", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMaxZ, "max_z", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMaxXY, "max_xy", ""));
+    CBM_YAML_PROPERTIES(cbm::util::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fName, "name", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fRefZ, "ref_z", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMinZ, "min_z", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMaxZ, "max_z", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::MaterialSlice::fMaxXY, "max_xy", ""));
   };
 
   struct Config {
@@ -53,14 +53,14 @@ class CbmGenerateMaterialMaps : public FairTask {
     bool fbTrackingStations = false;  ///< Generates material maps for the actual geometry stations
     bool fbSafeMaterialInit = true;   ///< Safe material initialization (takes extra computational time)
 
-    CBM_YAML_PROPERTIES(cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fvUserSlices, "user_slices", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fPitch, "pitch", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fMaxNofBins, "max_nof_bins", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fNofRays, "nof_rays", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fbParallelRays, "parallel_rays", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fbTrackingStations,
+    CBM_YAML_PROPERTIES(cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fvUserSlices, "user_slices", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fPitch, "pitch", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fMaxNofBins, "max_nof_bins", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fNofRays, "nof_rays", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fbParallelRays, "parallel_rays", ""),
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fbTrackingStations,
                                                "tracking_stations", ""),
-                   cbm::algo::yaml::Property(&CbmGenerateMaterialMaps::Config::fbSafeMaterialInit,
+                   cbm::util::yaml::Property(&CbmGenerateMaterialMaps::Config::fbSafeMaterialInit,
                                                "safe_material_init", ""));
   };
 
diff --git a/reco/tasks/CMakeLists.txt b/reco/tasks/CMakeLists.txt
index cd37d5cbb1..0c10f050b8 100644
--- a/reco/tasks/CMakeLists.txt
+++ b/reco/tasks/CMakeLists.txt
@@ -61,7 +61,6 @@ set(PRIVATE_DEPENDENCIES
 
 set(INTERFACE_DEPENDENCIES
   external::fles_ipc
-  CbmYamlInterface
   )
 
 generate_cbm_library()
diff --git a/reco/tasks/CbmTaskStsHitFinderParWrite.cxx b/reco/tasks/CbmTaskStsHitFinderParWrite.cxx
index cb27cbcfc7..928df95bb6 100644
--- a/reco/tasks/CbmTaskStsHitFinderParWrite.cxx
+++ b/reco/tasks/CbmTaskStsHitFinderParWrite.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2024 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2024-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 
@@ -13,8 +13,8 @@
 #include "CbmStsPhysics.h"
 #include "CbmStsRecoModule.h"
 #include "CbmStsSetup.h"
+#include "CbmYaml.h"
 #include "sts/HitfinderPars.h"
-#include "yaml/Yaml.h"
 
 #include <FairField.h>
 #include <FairRootManager.h>
diff --git a/reco/tasks/CbmTaskTofClusterizer.cxx b/reco/tasks/CbmTaskTofClusterizer.cxx
index cbf6ca5aef..09f8b08757 100644
--- a/reco/tasks/CbmTaskTofClusterizer.cxx
+++ b/reco/tasks/CbmTaskTofClusterizer.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2022-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer], Pierre-Alain Loizeau, Norbert Herrmann */
 
@@ -25,8 +25,8 @@
 #include "TStopwatch.h"
 
 // C++ Classes and includes
+#include "CbmYaml.h"
 #include "compat/Filesystem.h"
-#include "yaml/Yaml.h"
 
 #include <iomanip>
 #include <vector>
diff --git a/reco/tasks/CbmTaskTofClusterizerParWrite.cxx b/reco/tasks/CbmTaskTofClusterizerParWrite.cxx
index 3ce04fce2f..ca40713de2 100644
--- a/reco/tasks/CbmTaskTofClusterizerParWrite.cxx
+++ b/reco/tasks/CbmTaskTofClusterizerParWrite.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
+/* Copyright (C) 2022-2025 Facility for Antiproton and Ion Research in Europe, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Dominik Smith [committer], Pierre-Alain Loizeau, Norbert Herrmann */
 
@@ -17,6 +17,7 @@
 #include "CbmTofGeoHandler.h"       // in tof/TofTools
 
 // FAIR classes and includes
+#include "CbmYaml.h"
 #include "FairRootFileSink.h"
 #include "FairRootManager.h"
 #include "FairRunAna.h"
@@ -25,7 +26,6 @@
 #include "bmon/HitfindSetup.h"
 #include "tof/CalibrateSetup.h"
 #include "tof/HitfindSetup.h"
-#include "yaml/Yaml.h"
 
 #include <Logger.h>
 
diff --git a/reco/tasks/CbmTaskTrdHitFinder.cxx b/reco/tasks/CbmTaskTrdHitFinder.cxx
index b9785e20b1..83a5001be3 100644
--- a/reco/tasks/CbmTaskTrdHitFinder.cxx
+++ b/reco/tasks/CbmTaskTrdHitFinder.cxx
@@ -1,10 +1,11 @@
-/* Copyright (C) 2010-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2010-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Florian Uhlig [committer], Pascal Raisig, Alexandru Bercuci */
 
 #include "CbmTaskTrdHitFinder.h"
 
 #include "CbmDigiManager.h"
+#include "CbmYaml.h"
 
 #include <FairRootManager.h>
 #include <FairRunAna.h>
@@ -13,7 +14,6 @@
 
 // C++ Classes and includes
 #include "compat/Filesystem.h"
-#include "yaml/Yaml.h"
 
 #include <TStopwatch.h>
 #include <TVector3.h>
diff --git a/reco/tasks/CbmTaskTrdHitFinderParWrite.cxx b/reco/tasks/CbmTaskTrdHitFinderParWrite.cxx
index 247f73e738..d14949be4f 100644
--- a/reco/tasks/CbmTaskTrdHitFinderParWrite.cxx
+++ b/reco/tasks/CbmTaskTrdHitFinderParWrite.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2010-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Florian Uhlig [committer], Pascal Raisig, Alexandru Bercuci */
 
@@ -12,11 +12,11 @@
 #include "CbmTrdParSetAsic.h"
 #include "CbmTrdParSetDigi.h"
 #include "CbmTrdParSetGeo.h"
+#include "CbmYaml.h"
 #include "TGeoPhysicalNode.h"
 #include "TVector3.h"
 #include "trd/Hitfind2DSetup.h"
 #include "trd/HitfindSetup.h"
-#include "yaml/Yaml.h"
 
 #include <FairRootManager.h>
 #include <FairRunAna.h>
diff --git a/reco/tasks/CbmTaskTrdUnpackParWrite.cxx b/reco/tasks/CbmTaskTrdUnpackParWrite.cxx
index 6679dc5995..4282a8a09b 100644
--- a/reco/tasks/CbmTaskTrdUnpackParWrite.cxx
+++ b/reco/tasks/CbmTaskTrdUnpackParWrite.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2024 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
+/* Copyright (C) 2024-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Felix Weiglhofer [committer] */
 
@@ -10,9 +10,9 @@
 #include "CbmTrdParSetAsic.h"
 #include "CbmTrdParSetDigi.h"
 #include "CbmTrdParSpadic.h"
+#include "CbmYaml.h"
 #include "trd/ReadoutConfig.h"
 #include "trd2d/ReadoutConfig.h"
-#include "yaml/Yaml.h"
 
 #include <FairParamList.h>
 #include <fairlogger/Logger.h>
diff --git a/reco/tasks/CbmTaskUnpack.cxx b/reco/tasks/CbmTaskUnpack.cxx
index feb1d29f40..80a3fbd5a3 100644
--- a/reco/tasks/CbmTaskUnpack.cxx
+++ b/reco/tasks/CbmTaskUnpack.cxx
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Volker Friese [committer] */
 
@@ -20,13 +20,13 @@
 #include "CbmTrdParSetDigi.h"
 #include "CbmTrdParSpadic.h"
 #include "CbmTsEventHeader.h"
+#include "CbmYaml.h"
 #include "MicrosliceDescriptor.hpp"
 #include "ParFiles.h"
 #include "System.hpp"
 #include "bmon/ReadoutConfig.h"
 #include "sts/ChannelMaskSet.h"
 #include "tof/ReadoutConfig.h"
-#include "yaml/Yaml.h"
 
 #include <FairParAsciiFileIo.h>
 #include <FairParamList.h>
-- 
GitLab