IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 6887ddf4 authored by ralfulrich's avatar ralfulrich
Browse files

updates and fixes

parent d7aa7265
No related branches found
No related tags found
No related merge requests found
...@@ -167,7 +167,7 @@ namespace corsika { ...@@ -167,7 +167,7 @@ namespace corsika {
template <typename TMediumInterface, template <typename> typename MExtraEnvirnoment> template <typename TMediumInterface, template <typename> typename MExtraEnvirnoment>
struct make_layered_spherical_atmosphere_builder { struct make_layered_spherical_atmosphere_builder {
template <typename... TArgs> template <typename... TArgs>
static auto create(Point const& center, LengthType const earthRadius, TArgs... args) { static auto create(Point const& center, LengthType const planetRadius, TArgs... args) {
return LayeredSphericalAtmosphereBuilder<TMediumInterface, MExtraEnvirnoment, return LayeredSphericalAtmosphereBuilder<TMediumInterface, MExtraEnvirnoment,
TArgs...>{std::forward<TArgs>(args)..., TArgs...>{std::forward<TArgs>(args)...,
center, planetRadius}; center, planetRadius};
......
...@@ -158,24 +158,29 @@ int main(int argc, char** argv) { ...@@ -158,24 +158,29 @@ int main(int argc, char** argv) {
->default_str("info") ->default_str("info")
->check(CLI::IsMember({"warn", "info", "debug", "trace"})) ->check(CLI::IsMember({"warn", "info", "debug", "trace"}))
->group("Misc."); ->group("Misc.");
app.add_option("-v,--verbosity", "Verbosity level: warn, info, debug, trace.")
->default_val("info")
->check(CLI::IsMember({"warn", "info", "debug", "trace"}))
->group("Misc.");
// parse the command line options into the variables // parse the command line options into the variables
CLI11_PARSE(app, argc, argv); CLI11_PARSE(app, argc, argv);
string const loglevel = if (app.count("--verbosity")) {
(app.count("--verbosity") ? app["--verbosity"]->as<string>() : "info"); string const loglevel = app["verbosity"]->as<string>();
if (loglevel == "warn") { if (loglevel == "warn") {
logging::set_level(logging::level::warn); logging::set_level(logging::level::warn);
} else if (loglevel == "info") { } else if (loglevel == "info") {
logging::set_level(logging::level::info); logging::set_level(logging::level::info);
} else if (loglevel == "debug") { } else if (loglevel == "debug") {
logging::set_level(logging::level::debug); logging::set_level(logging::level::debug);
} else if (loglevel == "trace") { } else if (loglevel == "trace") {
#ifndef DEBUG #ifndef DEBUG
CORSIKA_LOG_ERROR("trace log level requires a Debug build."); CORSIKA_LOG_ERROR("trace log level requires a Debug build.");
return 1; return 1;
#endif #endif
logging::set_level(logging::level::trace); logging::set_level(logging::level::trace);
}
} }
// check that we got either PDG or A/Z // check that we got either PDG or A/Z
...@@ -217,7 +222,7 @@ int main(int argc, char** argv) { ...@@ -217,7 +222,7 @@ int main(int argc, char** argv) {
/* === END: SETUP ENVIRONMENT AND ROOT COORDINATE SYSTEM === */ /* === END: SETUP ENVIRONMENT AND ROOT COORDINATE SYSTEM === */
ofstream atmout("earth.dat"); ofstream atmout("earth.dat");
for (LengthType h = 0_m; h < 110_km; h += 10_m) { for (LengthType h = 0_m; h < 110_km; h += 100_m) {
Point const ptest{rootCS, 0_m, 0_m, builder.getPlanetRadius() + h}; Point const ptest{rootCS, 0_m, 0_m, builder.getPlanetRadius() + h};
auto rho = auto rho =
env.getUniverse()->getContainingNode(ptest)->getModelProperties().getMassDensity( env.getUniverse()->getContainingNode(ptest)->getModelProperties().getMassDensity(
...@@ -228,6 +233,8 @@ int main(int argc, char** argv) { ...@@ -228,6 +233,8 @@ int main(int argc, char** argv) {
/* === START: CONSTRUCT PRIMARY PARTICLE === */ /* === START: CONSTRUCT PRIMARY PARTICLE === */
/* === START: CONSTRUCT PRIMARY PARTICLE === */
// parse the primary ID as a PDG or A/Z code // parse the primary ID as a PDG or A/Z code
Code beamCode; Code beamCode;
......
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