From 57c54a946b7f281c667a6bf8878bdea4dd6eff8a Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu> Date: Wed, 7 Dec 2022 17:02:25 +0100 Subject: [PATCH] use stack with weight in tests --- tests/common/SetupStack.hpp | 4 ++-- tests/common/TestStack.hpp | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/common/SetupStack.hpp b/tests/common/SetupStack.hpp index e2bd85f2a..4a7ceff3f 100644 --- a/tests/common/SetupStack.hpp +++ b/tests/common/SetupStack.hpp @@ -31,11 +31,11 @@ namespace corsika::test { /* * the version without history */ - using Stack = detail::StackWithGeometry; + using Stack = detail::StackWithWeight; #endif // the correct secondary stack view using StackView = typename Stack::stack_view_type; -} // namespace corsika::test \ No newline at end of file +} // namespace corsika::test diff --git a/tests/common/TestStack.hpp b/tests/common/TestStack.hpp index 2488fc1f0..934575cb1 100644 --- a/tests/common/TestStack.hpp +++ b/tests/common/TestStack.hpp @@ -48,20 +48,33 @@ namespace corsika { node::GeometryData<DummyEnvironment>, StackWithGeometryInterface, DefaultSecondaryProducer>; + template <typename TStackIter> + using SetupWeightDataInterface = + typename weights::MakeWeightDataInterface<TStackIter>::type; + + template <typename TStackIter> + using StackWithWeightInterface = + CombinedParticleInterface<StackWithGeometry::pi_type, SetupWeightDataInterface, + TStackIter>; + + using StackWithWeight = + CombinedStack<typename StackWithGeometry::stack_data_type, weights::WeightData, + StackWithWeightInterface, DefaultSecondaryProducer>; + // ------------------------------------------ // Add [optional] history data to stack, too: // combine dummy stack with geometry information for tracking template <typename TStackIter> using StackWithHistoryInterface = - CombinedParticleInterface<StackWithGeometry::pi_type, + CombinedParticleInterface<StackWithWeight::pi_type, history::HistoryEventDataInterface, TStackIter>; using StackWithHistory = - CombinedStack<typename StackWithGeometry::stack_data_type, + CombinedStack<typename StackWithWeight::stack_data_type, history::HistoryEventData, StackWithHistoryInterface, history::HistorySecondaryProducer>; } // namespace test::detail -} // namespace corsika \ No newline at end of file +} // namespace corsika -- GitLab