From 6e35fa2b6f3bb8c78915e1de4939963cf9638daa Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Thu, 6 Oct 2022 00:03:25 +0200 Subject: [PATCH] L1 [bugfix]: pointer checks fixed --- reco/L1/CbmCaPerformance.cxx | 10 +++++----- reco/L1/L1Algo/L1ConfigRW.cxx | 9 ++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/reco/L1/CbmCaPerformance.cxx b/reco/L1/CbmCaPerformance.cxx index d630c1b5c0..989c6a1e09 100644 --- a/reco/L1/CbmCaPerformance.cxx +++ b/reco/L1/CbmCaPerformance.cxx @@ -122,22 +122,22 @@ void CbmCaPerformance::CheckInit() const // Check detectors initialization if (fbUseMvd) { - if (fpMvdPoints) { throw std::logic_error("MC points unavailable for MVD"); } + if (!fpMvdPoints) { throw std::logic_error("MC points unavailable for MVD"); } } if (fbUseSts) { - if (fpStsPoints) { throw std::logic_error("MC points unavailable for STS"); } + if (!fpStsPoints) { throw std::logic_error("MC points unavailable for STS"); } } if (fbUseMuch) { - if (fpMuchPoints) { throw std::logic_error("MC points unavailable for MuCh"); } + if (!fpMuchPoints) { throw std::logic_error("MC points unavailable for MuCh"); } } if (fbUseTrd) { - if (fpTrdPoints) { throw std::logic_error("MC points unavailable for TRD"); } + if (!fpTrdPoints) { throw std::logic_error("MC points unavailable for TRD"); } } if (fbUseTof) { - if (fpTofPoints) { throw std::logic_error("MC points unavailable for TOF"); } + if (!fpTofPoints) { throw std::logic_error("MC points unavailable for TOF"); } } } diff --git a/reco/L1/L1Algo/L1ConfigRW.cxx b/reco/L1/L1Algo/L1ConfigRW.cxx index 1a8f30ef6e..4222d11225 100644 --- a/reco/L1/L1Algo/L1ConfigRW.cxx +++ b/reco/L1/L1Algo/L1ConfigRW.cxx @@ -53,7 +53,6 @@ void L1ConfigRW::ReadCAIterations(const YAML::Node& node) LOG(info) << "L1 config: Reading CA tracking iterations sequence. Default iterations will be ignored"; } fpInitManager->ClearCAIterations(); - L1_SHOW(node.size()); fpInitManager->SetCAIterationsNumberCrosscheck(node.size()); if (fVerbose > 2) { LOG(info) << "L1 config: " << fVerbose << " CA iterations were recorded"; } if (fVerbose > 3) { LOG(info) << "L1 config: Recorded iterations:"; } @@ -110,14 +109,10 @@ void L1ConfigRW::ReadYaml(const std::string& filename) config = YAML::LoadFile(filename); } catch (const YAML::BadFile& exc) { - std::stringstream msg; - msg << "file does not exist"; - throw std::runtime_error(msg.str()); + throw std::runtime_error("file does not exist"); } catch (const YAML::ParserException& exc) { - std::stringstream msg; - msg << "file is formatted improperly"; - throw std::runtime_error(msg.str()); + throw std::runtime_error("file is formatted improperly"); } // Tracking iterations -- GitLab