IAP GITLAB

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

StackInspector

parent bb1a2819
No related branches found
No related tags found
No related merge requests found
...@@ -46,13 +46,16 @@ namespace corsika { ...@@ -46,13 +46,16 @@ namespace corsika {
if (ReportStack_) { if (ReportStack_) {
CoordinateSystemPtr const& rootCS = get_root_CoordinateSystem(); // for printout CoordinateSystemPtr const& rootCS = get_root_CoordinateSystem(); // for printout
auto pos = iterP.getPosition().getCoordinates(rootCS); auto pos = iterP.getPosition().getCoordinates(rootCS);
std::cout << "StackInspector: i=" << std::setw(5) << std::fixed << (i++) CORSIKA_LOG_DEBUG(
<< ", id=" << std::setw(30) << iterP.getPID() << " E=" << std::setw(15) "StackInspector: i= {:5d}"
<< std::scientific << (E / 1_GeV) << " GeV, " ", id= {:^15}"
<< " pos=" << pos << " node = " << iterP.getNode(); " E={:15e} GeV, "
" pos= {}"
" node = {}",
(i++), iterP.getPID(), (E / 1_GeV), pos, fmt::ptr(iterP.getNode()));
if (iterP.getPID() == Code::Nucleus) if (iterP.getPID() == Code::Nucleus)
std::cout << " nuc_ref=" << iterP.getNucleusRef(); CORSIKA_LOG_DEBUG("nuc_ref= {}", iterP.getNucleusRef());
std::cout << std::endl;
} }
} }
...@@ -67,13 +70,18 @@ namespace corsika { ...@@ -67,13 +70,18 @@ namespace corsika {
std::time_t const eta_time = std::chrono::system_clock::to_time_t( std::time_t const eta_time = std::chrono::system_clock::to_time_t(
StartTime_ + std::chrono::seconds((int)eta_seconds)); StartTime_ + std::chrono::seconds((int)eta_seconds));
std::cout << "StackInspector: " CORSIKA_LOG_DEBUG(
<< " time=" << std::put_time(std::localtime(&now_time), "%T") "StackInspector: "
<< ", running=" << elapsed_seconds.count() << " seconds" " time= {}"
<< " (" << std::setw(3) << int(progress * 100) << "%)" ", running= {} seconds"
<< ", nStep=" << getStep() << ", stackSize=" << vS.getSize() " ( {}%)"
<< ", Estack=" << Etot / 1_GeV << " GeV" ", nStep= {}"
<< ", ETA=" << std::put_time(std::localtime(&eta_time), "%T") << std::endl; ", stackSize= {}"
", Estack= {} GeV"
", ETA=",
std::put_time(std::localtime(&now_time), "%T"), elapsed_seconds.count(),
int(progress * 100), getStep(), vS.getSize(), Etot / 1_GeV,
std::put_time(std::localtime(&eta_time), "%T"));
} }
} // namespace corsika } // namespace corsika
\ No newline at end of file
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