From 128ea85ee6b7d4e567ad39ccaa847022de1ba8bb Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Thu, 21 Jan 2021 19:33:59 +0000 Subject: [PATCH] switch debug output to spdlog --- corsika/detail/modules/sibyll/Interaction.inl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/corsika/detail/modules/sibyll/Interaction.inl b/corsika/detail/modules/sibyll/Interaction.inl index e2c5f001f..69c4d4339 100644 --- a/corsika/detail/modules/sibyll/Interaction.inl +++ b/corsika/detail/modules/sibyll/Interaction.inl @@ -41,8 +41,7 @@ namespace corsika::sibyll { } inline Interaction::~Interaction() { - CORSIKA_LOG_DEBUG( - fmt::format("Sibyll::Interaction n={}, Nnuc={}", count_, nucCount_)); + CORSIKA_LOG_DEBUG("Sibyll::Interaction n={}, Nnuc={}", count_, nucCount_); } inline void Interaction::setStable(std::vector<corsika::Code> const& vParticleList) { @@ -54,13 +53,13 @@ namespace corsika::sibyll { } inline void Interaction::setUnstable(const corsika::Code vCode) { - std::cout << "Sibyll::Interaction: setting " << vCode << " unstable.." << std::endl; + CORSIKA_LOG_DEBUG("Sibyll::Interaction: setting {} unstable..", vCode); const int s_id = abs(corsika::sibyll::convertToSibyllRaw(vCode)); s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]); } inline void Interaction::setStable(const corsika::Code vCode) { - std::cout << "Sibyll::Interaction: setting " << vCode << " stable.." << std::endl; + CORSIKA_LOG_DEBUG("Sibyll::Interaction: setting {} stable..", vCode); const int s_id = abs(corsika::sibyll::convertToSibyllRaw(vCode)); s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]); } @@ -166,17 +165,17 @@ namespace corsika::sibyll { }); CORSIKA_LOG_DEBUG( - fmt::format("Interaction: " - "IntLength: weighted CrossSection (mb): {} ", - weightedProdCrossSection / 1_mb)); + "Interaction: " + "IntLength: weighted CrossSection (mb): {} ", + weightedProdCrossSection / 1_mb); // calculate interaction length in medium GrammageType const int_length = mediumComposition.getAverageMassNumber() * constants::u / weightedProdCrossSection; CORSIKA_LOG_DEBUG( - fmt::format("Interaction: " - "interaction length (g/cm2): {} ", - int_length / (0.001_kg) * 1_cm * 1_cm)); + "Interaction: " + "interaction length (g/cm2): {} ", + int_length / (0.001_kg) * 1_cm * 1_cm); return int_length; } -- GitLab