From 3471b6cd8dab83ca953527f5b728156ffb7e4fcb Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de> Date: Sat, 8 May 2021 22:29:18 +0200 Subject: [PATCH] renamed to InteractionLengthModifier --- ...yingProcess.inl => InteractionLengthModifier.inl} | 12 ++++++------ ...yingProcess.hpp => InteractionLengthModifier.hpp} | 8 ++++---- ...Process.cpp => testInteractionLengthModifier.cpp} | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) rename corsika/detail/framework/process/{IntLengthModifyingProcess.inl => InteractionLengthModifier.inl} (76%) rename corsika/framework/process/{IntLengthModifyingProcess.hpp => InteractionLengthModifier.hpp} (89%) rename tests/framework/{testIntLengthModifyingProcess.cpp => testInteractionLengthModifier.cpp} (86%) diff --git a/corsika/detail/framework/process/IntLengthModifyingProcess.inl b/corsika/detail/framework/process/InteractionLengthModifier.inl similarity index 76% rename from corsika/detail/framework/process/IntLengthModifyingProcess.inl rename to corsika/detail/framework/process/InteractionLengthModifier.inl index 1300439a4..a11c22ee4 100644 --- a/corsika/detail/framework/process/IntLengthModifyingProcess.inl +++ b/corsika/detail/framework/process/InteractionLengthModifier.inl @@ -16,22 +16,22 @@ namespace corsika { template <class TUnderlyingProcess> - inline IntLengthModifyingProcess<TUnderlyingProcess>::IntLengthModifyingProcess( + inline InteractionLengthModifier<TUnderlyingProcess>::InteractionLengthModifier( TUnderlyingProcess&& process, - std::function<IntLengthModifyingProcess::functor_signature> modifier) + std::function<InteractionLengthModifier::functor_signature> modifier) : process_{std::move(process)} , modifier_{std::move(modifier)} {} template <class TUnderlyingProcess> template <typename TSecondaryView> - inline void IntLengthModifyingProcess<TUnderlyingProcess>::doInteraction( + inline void InteractionLengthModifier<TUnderlyingProcess>::doInteraction( TSecondaryView& view) { process_.doInteraction(view); } template <class TUnderlyingProcess> template <typename TParticle> - inline GrammageType IntLengthModifyingProcess<TUnderlyingProcess>::getInteractionLength( + inline GrammageType InteractionLengthModifier<TUnderlyingProcess>::getInteractionLength( TParticle const& particle) { GrammageType const original = process_.getInteractionLength(particle); Code const pid = particle.getPID(); @@ -42,12 +42,12 @@ namespace corsika { template <class TUnderlyingProcess> inline TUnderlyingProcess const& - IntLengthModifyingProcess<TUnderlyingProcess>::getProcess() const { + InteractionLengthModifier<TUnderlyingProcess>::getProcess() const { return process_; } template <class TUnderlyingProcess> - inline TUnderlyingProcess& IntLengthModifyingProcess<TUnderlyingProcess>::getProcess() { + inline TUnderlyingProcess& InteractionLengthModifier<TUnderlyingProcess>::getProcess() { return process_; } diff --git a/corsika/framework/process/IntLengthModifyingProcess.hpp b/corsika/framework/process/InteractionLengthModifier.hpp similarity index 89% rename from corsika/framework/process/IntLengthModifyingProcess.hpp rename to corsika/framework/process/InteractionLengthModifier.hpp index ab1e4e3ad..d9013033e 100644 --- a/corsika/framework/process/IntLengthModifyingProcess.hpp +++ b/corsika/framework/process/InteractionLengthModifier.hpp @@ -23,8 +23,8 @@ namespace corsika { * length returned by the underlying process in a user-defined way. * */ template <class TUnderlyingProcess> - class IntLengthModifyingProcess - : public InteractionProcess<IntLengthModifyingProcess<TUnderlyingProcess>> { + class InteractionLengthModifier + : public InteractionProcess<InteractionLengthModifier<TUnderlyingProcess>> { //! identity function as default modifier static auto constexpr non_modifying_functor = [](GrammageType original, corsika::Code, @@ -39,7 +39,7 @@ namespace corsika { * Create wrapper around InteractionProcess. Note that the passed process object * itself may no longer be used, only through this class. */ - IntLengthModifyingProcess(TUnderlyingProcess&& process, + InteractionLengthModifier(TUnderlyingProcess&& process, std::function<functor_signature> modifier); //! wrapper around internal process doInteraction @@ -63,4 +63,4 @@ namespace corsika { } // namespace corsika -#include <corsika/detail/framework/process/IntLengthModifyingProcess.inl> +#include <corsika/detail/framework/process/InteractionLengthModifier.inl> diff --git a/tests/framework/testIntLengthModifyingProcess.cpp b/tests/framework/testInteractionLengthModifier.cpp similarity index 86% rename from tests/framework/testIntLengthModifyingProcess.cpp rename to tests/framework/testInteractionLengthModifier.cpp index 93e2072af..5d8ee70ed 100644 --- a/tests/framework/testIntLengthModifyingProcess.cpp +++ b/tests/framework/testInteractionLengthModifier.cpp @@ -6,7 +6,7 @@ * the license. */ -#include <corsika/framework/process/IntLengthModifyingProcess.hpp> +#include <corsika/framework/process/InteractionLengthModifier.hpp> #include <corsika/framework/core/PhysicalUnits.hpp> #include <catch2/catch.hpp> @@ -40,7 +40,7 @@ struct DummyParticle { Code getPID() const { return Code::MuPlus; } }; -TEST_CASE("IntLengthModifyingProcess", "[process]") { +TEST_CASE("InteractionLengthModifier", "[process]") { DummyProcess u; u.id = 38; @@ -48,8 +48,8 @@ TEST_CASE("IntLengthModifyingProcess", "[process]") { return orig * 2; }; - IntLengthModifyingProcess mod{std::move(u), modifier}; - REQUIRE(std::is_same_v<decltype(mod), IntLengthModifyingProcess<DummyProcess>>); + InteractionLengthModifier mod{std::move(u), modifier}; + REQUIRE(std::is_same_v<decltype(mod), InteractionLengthModifier<DummyProcess>>); SECTION("getInteractionLength") { DummyParticle const p; -- GitLab