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