From cc56943dbd4f0b48ad06da08b10d0e6c4a82547f Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Fri, 8 Nov 2024 04:03:58 +0100
Subject: [PATCH] comments/warning printouts clean-up

---
 algo/kf/core/geo/KfSetupBuilder.cxx    | 3 +--
 algo/kf/core/geo/KfSetupBuilder.h      | 8 ++++----
 reco/kfnew/CbmKfTrackingSetupBuilder.h | 8 ++++----
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/algo/kf/core/geo/KfSetupBuilder.cxx b/algo/kf/core/geo/KfSetupBuilder.cxx
index 6c300eb53b..1a019f915b 100644
--- a/algo/kf/core/geo/KfSetupBuilder.cxx
+++ b/algo/kf/core/geo/KfSetupBuilder.cxx
@@ -137,12 +137,11 @@ bool SetupBuilder::LoadMaterial()
     ia >> targetMat;
     ia >> fvMaterial;
     fTarget.SetMaterial(targetMat);
-    // TODO: Provide consistency check (geometry hash)
   }
   catch (const std::exception& err) {
     LOG(warn) << "kf::SetupBuilder::LoadMaterial: input file \"" << fsMaterialCacheFile
               << "\" has inconsistent format "
-                 "or was corrupted. The material maps will be generated";
+                 "or was corrupted. The material maps will be re-generated";
     return false;
   }
   LOG(info) << "kf::SetupBuilder::LoadMaterial: the material maps were loaded from cache file \"" << fsMaterialCacheFile
diff --git a/algo/kf/core/geo/KfSetupBuilder.h b/algo/kf/core/geo/KfSetupBuilder.h
index bebd43ad57..e21a3745c7 100644
--- a/algo/kf/core/geo/KfSetupBuilder.h
+++ b/algo/kf/core/geo/KfSetupBuilder.h
@@ -124,10 +124,10 @@ namespace cbm::algo::kf
     /// \param filename  Material budget cache file name
     /// \param refHash   Reference hash of the geometry
     ///
-    /// If provided, the instance will try to read the material budget maps from the file. If the file does not exist,
-    /// or the geometry hash was changed since the last time, the material budget maps will be recreated on the flight
-    /// and stored to the file. If the reference hash differs from one, read from the file, a warning will be produced,
-    /// and the new cache file will be generated.
+    /// If provided, the instance will try to read the material budget maps from the file.
+    /// If the file does not exist,or the geometry hash was changed since the last time (reference hash differs from
+    /// the one read from the file), a warning will be produced, the material budget maps will be recreated on the fly
+    /// and they will be stored again to the file (meaning a new cache file will be generated over the existing one).
     void SetMaterialCacheFile(const std::string& filename, size_t refHash)
     {
       fsMaterialCacheFile = filename;
diff --git a/reco/kfnew/CbmKfTrackingSetupBuilder.h b/reco/kfnew/CbmKfTrackingSetupBuilder.h
index 1263cd9e33..0965882cce 100644
--- a/reco/kfnew/CbmKfTrackingSetupBuilder.h
+++ b/reco/kfnew/CbmKfTrackingSetupBuilder.h
@@ -75,10 +75,10 @@ namespace cbm::kf
     /// \param filename  Material budget cache file name
     /// \param geoHash   A hash of the geometry
     ///
-    /// If provided, the instance will try to read the material budget maps from the file. If the file does not exist,
-    /// or the geometry hash was changed since the last time, the material budget maps will be recreated on the flight
-    /// and stored to the file. If the reference hash differs from one, read from the file, a warning will be produced,
-    /// and the new cache file will be generated.
+    /// If provided, the instance will try to read the material budget maps from the file.
+    /// If the file does not exist,or the geometry hash was changed since the last time (reference hash differs from
+    /// the one read from the file), a warning will be produced, the material budget maps will be recreated on the fly
+    /// and they will be stored again to the file (meaning a new cache file will be generated over the existing one).
     void SetMaterialCacheFile(const TString& filename, size_t geoHash)
     {
       fBuilder.SetMaterialCacheFile(filename.Data(), geoHash);
-- 
GitLab