Newer
Older
* (c) Copyright 2018 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 <array>
#include <iomanip>
#include <iostream>
#include <corsika/framework/process/ProcessSequence.hpp>
#include <corsika/framework/geometry/Point.hpp>
#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
#include <corsika/framework/geometry/Vector.hpp>
using namespace corsika;
using namespace std;
const int nData = 10;
class Process1 : public ContinuousProcess<Process1> {
ProcessReturn doContinuous(D& d, T&, bool const) const {
class Process2 : public ContinuousProcess<Process2> {
inline ProcessReturn doContinuous(D& d, T&, bool const) const {
class Process3 : public ContinuousProcess<Process3> {
inline ProcessReturn doContinuous(D&, T&, bool const) const {
class Process4 : public ContinuousProcess<Process4> {
inline ProcessReturn doContinuous(D& d, T&, bool const) 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
auto sequence = make_sequence(m1, m2, m3, m4);
DummyData particle;
DummyTrajectory track;
double check[nData] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
sequence.doContinuous(particle, track, ContinuousProcessIndex(0));
for (int i = 0; i < nData; ++i) { assert(particle.p[i] == check[i]); }
std::cout << "staticsequence_example" << std::endl;