IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 128ea85e authored by Felix Riehn's avatar Felix Riehn Committed by ralfulrich
Browse files

switch debug output to spdlog

parent 21c3b449
No related branches found
No related tags found
No related merge requests found
...@@ -41,8 +41,7 @@ namespace corsika::sibyll { ...@@ -41,8 +41,7 @@ namespace corsika::sibyll {
} }
inline Interaction::~Interaction() { inline Interaction::~Interaction() {
CORSIKA_LOG_DEBUG( CORSIKA_LOG_DEBUG("Sibyll::Interaction n={}, Nnuc={}", count_, nucCount_);
fmt::format("Sibyll::Interaction n={}, Nnuc={}", count_, nucCount_));
} }
inline void Interaction::setStable(std::vector<corsika::Code> const& vParticleList) { inline void Interaction::setStable(std::vector<corsika::Code> const& vParticleList) {
...@@ -54,13 +53,13 @@ namespace corsika::sibyll { ...@@ -54,13 +53,13 @@ namespace corsika::sibyll {
} }
inline void Interaction::setUnstable(const corsika::Code vCode) { 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)); const int s_id = abs(corsika::sibyll::convertToSibyllRaw(vCode));
s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]); s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]);
} }
inline void Interaction::setStable(const corsika::Code vCode) { 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)); const int s_id = abs(corsika::sibyll::convertToSibyllRaw(vCode));
s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]); s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]);
} }
...@@ -166,17 +165,17 @@ namespace corsika::sibyll { ...@@ -166,17 +165,17 @@ namespace corsika::sibyll {
}); });
CORSIKA_LOG_DEBUG( CORSIKA_LOG_DEBUG(
fmt::format("Interaction: " "Interaction: "
"IntLength: weighted CrossSection (mb): {} ", "IntLength: weighted CrossSection (mb): {} ",
weightedProdCrossSection / 1_mb)); weightedProdCrossSection / 1_mb);
// calculate interaction length in medium // calculate interaction length in medium
GrammageType const int_length = mediumComposition.getAverageMassNumber() * GrammageType const int_length = mediumComposition.getAverageMassNumber() *
constants::u / weightedProdCrossSection; constants::u / weightedProdCrossSection;
CORSIKA_LOG_DEBUG( CORSIKA_LOG_DEBUG(
fmt::format("Interaction: " "Interaction: "
"interaction length (g/cm2): {} ", "interaction length (g/cm2): {} ",
int_length / (0.001_kg) * 1_cm * 1_cm)); int_length / (0.001_kg) * 1_cm * 1_cm);
return int_length; return int_length;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment