From 8c565b839f64b16235bb643df6e316dd5418650c Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Thu, 27 May 2021 00:23:49 +0200
Subject: [PATCH] try to fix testPythia8

---
 corsika/detail/modules/pythia8/Interaction.inl | 2 +-
 tests/modules/testPythia8.cpp                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/corsika/detail/modules/pythia8/Interaction.inl b/corsika/detail/modules/pythia8/Interaction.inl
index 752ac96a1..9e13f4de8 100644
--- a/corsika/detail/modules/pythia8/Interaction.inl
+++ b/corsika/detail/modules/pythia8/Interaction.inl
@@ -160,7 +160,7 @@ namespace corsika::pythia8 {
     MomentumVector const& pMomentum = particle.getMomentum();
     CoordinateSystemPtr const& labCS = pMomentum.getCoordinateSystem();
 
-    Code const corsikaBeamId = particle.getPID();
+    Code corsikaBeamId = particle.getPID();
 
     // beam particles for pythia : 1, 2, 3 for p, pi, k
     // read from cross section code table
diff --git a/tests/modules/testPythia8.cpp b/tests/modules/testPythia8.cpp
index 09a7c0672..d07c791f5 100644
--- a/tests/modules/testPythia8.cpp
+++ b/tests/modules/testPythia8.cpp
@@ -165,7 +165,7 @@ TEST_CASE("Pythia8Interface", "modules") {
         Code::Proton, 0, 0, 7_TeV, (setup::Environment::BaseNodeType* const)nodePtr,
         *csPtr);
     auto& view = *secViewPtr;
-    auto particle = stackPtr->first();
+    auto const particle = stackPtr->getNextParticle();
 
     corsika::pythia8::Interaction collision;
 
-- 
GitLab