IAP GITLAB

Skip to content
Snippets Groups Projects
Commit cc750795 authored by Remy Prechelt's avatar Remy Prechelt
Browse files

Update tests with new output code.

parent b4aeaaac
No related branches found
No related tags found
1 merge request!317Output infrastructure and Python analysis library.
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
* the license. * the license.
*/ */
#include <corsika/setup/SetupStack.hpp>
#include <corsika/setup/SetupTrajectory.hpp>
namespace corsika { namespace corsika {
template <typename TOutput> template <typename TOutput>
...@@ -47,7 +50,7 @@ namespace corsika { ...@@ -47,7 +50,7 @@ namespace corsika {
template <typename TOutput> template <typename TOutput>
inline LengthType ObservationPlane<TOutput>::getMaxStepLength( inline LengthType ObservationPlane<TOutput>::getMaxStepLength(
corsika::setup::Stack::particle_type const& vParticle, corsika::setup::Stack::particle_type const& particle,
corsika::setup::Trajectory const& trajectory) { corsika::setup::Trajectory const& trajectory) {
Intersections const intersection = Intersections const intersection =
......
...@@ -145,7 +145,6 @@ namespace corsika { ...@@ -145,7 +145,6 @@ namespace corsika {
if (state_ == OutputState::LibraryReady) { endOfLibrary(); } if (state_ == OutputState::LibraryReady) { endOfLibrary(); }
} }
// void OutputManager::add(std::string const& name, BaseOutput& output) {
template <typename TOutput> template <typename TOutput>
void OutputManager::add(std::string const& name, TOutput& output) { void OutputManager::add(std::string const& name, TOutput& output) {
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <corsika/media/HomogeneousMedium.hpp> #include <corsika/media/HomogeneousMedium.hpp>
#include <corsika/media/NuclearComposition.hpp> #include <corsika/media/NuclearComposition.hpp>
#include <corsika/output/DummyOutputManager.hpp>
#include <SetupTestTrajectory.hpp> #include <SetupTestTrajectory.hpp>
#include <catch2/catch.hpp> #include <catch2/catch.hpp>
...@@ -163,8 +165,10 @@ TEST_CASE("Cascade", "[Cascade]") { ...@@ -163,8 +165,10 @@ TEST_CASE("Cascade", "[Cascade]") {
Point(rootCS, {0_m, 0_m, 10_km}), 0_ns)); Point(rootCS, {0_m, 0_m, 10_km}), 0_ns));
DummyTracking tracking; DummyTracking tracking;
Cascade<DummyTracking, decltype(sequence), TestCascadeStack, TestCascadeStackView> EAS( DummyOutputManager output;
env, tracking, sequence, stack); Cascade<DummyTracking, decltype(sequence), DummyOutputManager, TestCascadeStack,
TestCascadeStackView>
EAS(env, tracking, sequence, output, stack);
SECTION("full cascade") { SECTION("full cascade") {
EAS.run(); EAS.run();
......
...@@ -54,8 +54,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") { ...@@ -54,8 +54,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") {
SECTION("horizontal plane") { SECTION("horizontal plane") {
Plane const obsPlane(Point(cs, {10_m, 0_m, 0_m}), DirectionVector(cs, {1., 0., 0.})); Plane const obsPlane(Point(cs, {10_m, 0_m, 0_m}), DirectionVector(cs, {1., 0., 0.}));
ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 1., 0.}), "particles.dat", ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 1., 0.}));
true);
LengthType const length = obs.getMaxStepLength(particle, no_used_track); LengthType const length = obs.getMaxStepLength(particle, no_used_track);
ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true); ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true);
...@@ -66,8 +65,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") { ...@@ -66,8 +65,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") {
SECTION("transparent plane") { SECTION("transparent plane") {
Plane const obsPlane(Point(cs, {1_m, 0_m, 0_m}), DirectionVector(cs, {1., 0., 0.})); Plane const obsPlane(Point(cs, {1_m, 0_m, 0_m}), DirectionVector(cs, {1., 0., 0.}));
ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 0., 1.}), "particles.dat", ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 0., 1.}));
false);
LengthType const length = obs.getMaxStepLength(particle, no_used_track); LengthType const length = obs.getMaxStepLength(particle, no_used_track);
ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true); ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true);
...@@ -85,8 +83,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") { ...@@ -85,8 +83,7 @@ TEST_CASE("ObservationPlane", "[proccesses][observation_plane]") {
Plane const obsPlane(Point(cs, {10_m, 5_m, 5_m}), Plane const obsPlane(Point(cs, {10_m, 5_m, 5_m}),
DirectionVector(cs, {1, 0.1, -0.05})); DirectionVector(cs, {1, 0.1, -0.05}));
ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 1., 0.}), "particles.dat", ObservationPlane obs(obsPlane, DirectionVector(cs, {0., 1., 0.}));
true);
LengthType const length = obs.getMaxStepLength(particle, no_used_track); LengthType const length = obs.getMaxStepLength(particle, no_used_track);
ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true); ProcessReturn const ret = obs.doContinuous(particle, no_used_track, true);
......
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