Newer
Older
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#include <corsika/framework/process/ProcessSequence.hpp>
#include <corsika/framework/geometry/Point.hpp>
#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
#include <corsika/framework/geometry/Vector.hpp>
#include <array>
#include <iomanip>
#include <iostream>
using namespace corsika;
using namespace corsika::units::si;
using namespace std;
const int nData = 10;
class Process1 : public ContinuousProcess<Process1> {
template <typename D, typename T>
EProcessReturn DoContinuous(D& d, T&) const {
class Process2 : public ContinuousProcess<Process2> {
template <typename D, typename T>
inline EProcessReturn DoContinuous(D& d, T&) const {
class Process3 : public ContinuousProcess<Process3> {
template <typename D, typename T>
inline EProcessReturn DoContinuous(D&, T&) const {
class Process4 : public ContinuousProcess<Process4> {
template <typename D, typename T>
inline EProcessReturn DoContinuous(D& d, T&) const {
double p[nData] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
};
struct DummyStack {
void clear() {}
Process1 m1; // + 1.0
Process2 m2; // - (0.1*i)
Process3 m3; // * 1.0
ralfulrich
committed
auto sequence = process::sequence(m1, m2, m3, m4);
DummyData particle;
DummyTrajectory track;
double check[nData] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
for (int iEv = 0; iEv < nEv; ++iEv) {
sequence.DoContinuous(particle, track);
for (int i = 0; i < nData; ++i) { assert(particle.p[i] == check[i]); }
std::cout << "staticsequence_example" << std::endl;