From d7f0b0f4c250589c665c0acf9ba0379d15eca395 Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Fri, 16 Sep 2022 11:39:03 +0200 Subject: [PATCH] L1 [bugfix]: Fix of parameters initialization for tracking via YAML configuration file --- reco/L1/CbmL1.cxx | 9 +++++++++ reco/L1/CbmL1.h | 2 +- reco/L1/L1Algo/L1InitManager.cxx | 2 +- reco/L1/L1Algo/L1Parameters.cxx | 4 +--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index f1b0f7107a..2cee0aea39 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -137,6 +137,15 @@ InitStatus CbmL1::ReInit() return Init(); } +// --------------------------------------------------------------------------------------------------------------------- +// +void CbmL1::SetInputConfigName(const char* filename) +{ + LOG(info) << "Reading parameters from configuration file: " << filename; + LOG(warn) << "\033[1;31mParameters configuration for tracking is not finalized! To be used only for tests! \033[0m"; + fInitManager.SetInputConfigName(std::string(filename)); +} + // --------------------------------------------------------------------------------------------------------------------- // InitStatus CbmL1::Init() diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 21535b2054..2d5393ec9c 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -227,7 +227,7 @@ public: /// If the file is undefined, default tracking parameters will be used. Otherwise, the default parameters will be /// overridden with ones from the configuration file /// \param filename Name of the input tracking configuration file - void SetInputConfigName(const char* filename) { fInitManager.SetInputConfigName(std::string(filename)); } + void SetInputConfigName(const char* filename); /// \brief Sets a name for the output configuration file /// \param filename Name of the input tracking configuration file diff --git a/reco/L1/L1Algo/L1InitManager.cxx b/reco/L1/L1Algo/L1InitManager.cxx index 02c3c47d18..cacec55524 100644 --- a/reco/L1/L1Algo/L1InitManager.cxx +++ b/reco/L1/L1Algo/L1InitManager.cxx @@ -147,7 +147,7 @@ void L1InitManager::ClearCAIterations() fParameters.fCAIterations.clear(); fCAIterationsNumberCrosscheck = -1; fInitController.SetFlag(EInitKey::kCAIterations, false); - fInitController.SetFlag(EInitKey::kStationsNumberCrosscheck, false); + fInitController.SetFlag(EInitKey::kCAIterationsNumberCrosscheck, false); } // ---------------------------------------------------------------------------------------------------------------------- diff --git a/reco/L1/L1Algo/L1Parameters.cxx b/reco/L1/L1Algo/L1Parameters.cxx index 851324bb17..129392dc41 100644 --- a/reco/L1/L1Algo/L1Parameters.cxx +++ b/reco/L1/L1Algo/L1Parameters.cxx @@ -233,12 +233,10 @@ void L1Parameters::CheckConsistency() const LOG(info) << "Consistency test for L1 parameters object... \033[1;32mpassed\033[0m"; } - //---------------------------------------------------------------------------------------------------------------------- // void L1Parameters::Print(int /*verbosityLevel*/) const { - LOG(info) << "-------------- L1Algo parameters ---------------"; LOG(info) << ToString(); } @@ -289,7 +287,7 @@ std::string L1Parameters::ToString(int verbosity, int indentLevel) const } aStream << " | total = " << std::setw(2) << std::setfill(' ') << fNstationsActiveTotal; aStream << '\n'; - aStream << indent << indentChar << indentChar << "Active station indeces: "; + aStream << indent << indentChar << indentChar << "Active station indexes: "; for (int idx = 0; idx < *(fNstationsActive.end() - 1); ++idx) { aStream << std::setw(3) << std::setfill(' ') << fActiveStationGlobalIDs[idx] << ' '; } -- GitLab