diff --git a/Framework/ProcessSequence/BaseProcess.h b/Framework/ProcessSequence/BaseProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..5f6012202f428d1d9c52968da3c321a60b6c0f4b --- /dev/null +++ b/Framework/ProcessSequence/BaseProcess.h @@ -0,0 +1,25 @@ +#ifndef _include_corsika_baseprocess_h_ +#define _include_corsika_baseprocess_h_ + +#include <corsika/process/ProcessReturn.h> // for convenience + +namespace corsika::process { + + /** + \class BaseProcess + + The structural base type of a process object in a + ProcessSequence. Both, the ProcessSequence and all its elements + are of type BaseProcess<T> + + */ + + template <typename derived> + struct BaseProcess { + derived& GetRef() { return static_cast<derived&>(*this); } + const derived& GetRef() const { return static_cast<const derived&>(*this); } + }; + +} + +#endif diff --git a/Framework/ProcessSequence/CMakeLists.txt b/Framework/ProcessSequence/CMakeLists.txt index 9852db42b1639b27470d66253de69d5a5e561ee6..f0e14f729b602e2f31334825ed0cd7bfc91eed9f 100644 --- a/Framework/ProcessSequence/CMakeLists.txt +++ b/Framework/ProcessSequence/CMakeLists.txt @@ -10,6 +10,7 @@ set ( #header files of this library set ( CORSIKAprocesssequence_HEADERS + BaseProcess.h ProcessSequence.h ProcessReturn.h ) diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h index 4b2fc83c28ad0e1ec978c24814e5a4285a00aa40..9afe793f2302269acc8e2e6429f5f11ada289b2a 100644 --- a/Framework/ProcessSequence/ProcessSequence.h +++ b/Framework/ProcessSequence/ProcessSequence.h @@ -12,6 +12,7 @@ #ifndef _include_ProcessSequence_h_ #define _include_ProcessSequence_h_ +#include <corsika/process/BaseProcess.h> #include <corsika/process/ProcessReturn.h> #include <cmath> @@ -20,21 +21,6 @@ namespace corsika::process { - /** - \class BaseProcess - - The structural base type of a process object in a - ProcessSequence. Both, the ProcessSequence and all its elements - are of type BaseProcess<T> - - */ - - template <typename derived> - struct BaseProcess { - derived& GetRef() { return static_cast<derived&>(*this); } - const derived& GetRef() const { return static_cast<const derived&>(*this); } - }; - /** \class ProcessSequence @@ -69,6 +55,7 @@ namespace corsika::process { return std::min(A.MinStepLength(d), B.MinStepLength(d)); } + /* template <typename Particle, typename Trajectory> inline Trajectory Transport(Particle& p, double& length) const { A.Transport(p, length); // todo: maybe check (?) if there is more than one Transport @@ -76,7 +63,8 @@ namespace corsika::process { return B.Transport( p, length); // need to do this also to decide which Trajectory to return!!!! } - + */ + template <typename Particle, typename Stack> void DoDiscrete(Particle& p, Stack& s) const { A.DoDiscrete(p, s); diff --git a/Processes/StackInspector/StackInspector.h b/Processes/StackInspector/StackInspector.h index 3127177692bdf2cc3dd75694600962252af8f39d..1d9436cb102d9a24bc2a5673c085433a0b1e2f5f 100644 --- a/Processes/StackInspector/StackInspector.h +++ b/Processes/StackInspector/StackInspector.h @@ -1,7 +1,7 @@ #ifndef _Physics_StackInspector_StackInspector_h_ #define _Physics_StackInspector_StackInspector_h_ -#include <corsika/process/ProcessSequence.h> +#include <corsika/process/BaseProcess.h> namespace corsika::process {