diff --git a/corsika/framework/stack/CombinedStack.hpp b/corsika/framework/stack/CombinedStack.hpp index 10b2f903c6abcd12e6ae07526349e93254b6dd99..2e43a94253454dd20b61241d18761924aef45c29 100644 --- a/corsika/framework/stack/CombinedStack.hpp +++ b/corsika/framework/stack/CombinedStack.hpp @@ -66,13 +66,13 @@ namespace corsika { } template <typename... Args1> - void setParticleData(pi_a_type& p, const std::tuple<Args1...> vA) { + void setParticleData(PI_C& p, const std::tuple<Args1...> vA) { // static_assert(MT<I>::has_not, "error"); pi_a_type::setParticleData(static_cast<pi_a_type&>(p), vA); // original stack pi_b_type::setParticleData(static_cast<pi_b_type&>(p)); // addon stack } template <typename... Args1, typename... Args2> - void setParticleData(pi_c_type& p, const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) { + void setParticleData(PI_C& p, const std::tuple<Args1...> vA, const std::tuple<Args2...> vB) { pi_a_type::setParticleData(static_cast<pi_a_type&>(p), vA); pi_b_type::setParticleData(static_cast<pi_b_type&>(p), vB); @@ -80,7 +80,7 @@ namespace corsika { ///@} std::string as_string() const { - return fmt::format("[[{}][{}]]", pi_a_type::as_string(), pi_b_type::as_string()); + return fmt::format("[[{}][{}]]", PI_A::as_string(), pi_b_type::as_string()); } private: diff --git a/corsika/framework/stack/ParticleBase.hpp b/corsika/framework/stack/ParticleBase.hpp index 75a4de78bcb91ab88f8f1513aed0914fe7d6515f..3af897ab88ca7e5de3e64e81293391f75e9b0f4d 100644 --- a/corsika/framework/stack/ParticleBase.hpp +++ b/corsika/framework/stack/ParticleBase.hpp @@ -68,11 +68,6 @@ namespace corsika { */ bool isDeleted() const { return this->getIterator().getStack().isDeleted(this->getIterator()); } - /** - * Method to retrieve the status of the Particle. Is it already deleted? Or not. - */ - bool isDeleted() const { return GetIterator().GetStack().isDeleted(GetIterator()); } - /** * Add a secondary particle based on *this on the stack @param * args is a variadic list of input data that has to match the diff --git a/corsika/framework/stack/SecondaryView.hpp b/corsika/framework/stack/SecondaryView.hpp index 7986159db6eb81eaddab84dad8ff33ec21228de9..6fd7c209322073b9a069b1b94db432c37058499a 100644 --- a/corsika/framework/stack/SecondaryView.hpp +++ b/corsika/framework/stack/SecondaryView.hpp @@ -549,4 +549,4 @@ namespace corsika { } // namespace corsika -//#include <corsika/detail/framework/stack/SecondaryView.inl> +#include <corsika/detail/framework/stack/SecondaryView.inl> diff --git a/corsika/framework/stack/Stack.hpp b/corsika/framework/stack/Stack.hpp index 1d00b2a88fbb4a06848be1f8bd8768b711354783..ad1e378d7848e93f1879c5211d99c37ac011da7c 100644 --- a/corsika/framework/stack/Stack.hpp +++ b/corsika/framework/stack/Stack.hpp @@ -239,24 +239,24 @@ namespace corsika { */ template <typename... TArgs> stack_iterator_type addParticle(const TArgs... v) { - //C8LOG_TRACE("Stack::AddParticle"); + C8LOG_TRACE("Stack::AddParticle"); data_.incrementSize(); deleted_.push_back(false); return stack_iterator_type(*this, getSize() - 1, v...); } void swap(stack_iterator_type a, stack_iterator_type b) { - //C8LOG_TRACE("Stack::Swap"); + C8LOG_TRACE("Stack::Swap"); swap(a.getIndex(), b.getIndex()); } void copy(stack_iterator_type a, stack_iterator_type b) { - //C8LOG_TRACE("Stack::Copy"); + C8LOG_TRACE("Stack::Copy"); copy(a.getIndex(), b.getIndex()); } - void copy(const_stack_iterator_type a, stack_iterator_type b) { - //C8LOG_TRACE("Stack::Copy"); + void copy(stack_iterator_type a, stack_iterator_type b) { + C8LOG_TRACE("Stack::Copy"); data_.copy(a.getIndex(), b.getIndex()); if (deleted_[b.getIndex()] && !deleted_[a.getIndex()]) nDeleted_--; if (!deleted_[b.getIndex()] && deleted_[a.getIndex()]) nDeleted_++; @@ -264,7 +264,7 @@ namespace corsika { } void erase(stack_iterator_type p) { - //C8LOG_TRACE("Stack::Delete"); + C8LOG_TRACE("Stack::Delete"); if (this->isEmpty()) { /*error*/ throw std::runtime_error("Stack, cannot delete entry since size is zero"); } @@ -276,7 +276,7 @@ namespace corsika { /** * delete this particle */ - void erase(particle_interface_type p) { + void erase(ParticleInterfaceType p) { this->erase(p.getIterator()); } @@ -295,11 +295,11 @@ namespace corsika { return isDeleted(p.getIndex()); } - bool isDeleted(const const_stack_iterator_type& p) const { + bool isDeleted(const ConstStackIterator& p) const { return isDeleted(p.getIndex()); } - bool isDeleted(const particle_interface_type& p) const { + bool isDeleted(const ParticleInterfaceType& p) const { return isDeleted(p.getIterator()); } @@ -311,7 +311,7 @@ namespace corsika { bool purgeLastIfDeleted() { if (!deleted_.back()) return false; // the last particle is not marked for deletion. Do nothing. - //C8LOG_TRACE("Stack::purgeLastIfDeleted: yes"); + C8LOG_TRACE("Stack::purgeLastIfDeleted: yes"); data_.decrementSize(); nDeleted_--; deleted_.pop_back(); @@ -371,19 +371,19 @@ namespace corsika { */ template <typename... TArgs> stack_iterator_type addSecondary(stack_iterator_type& parent, const TArgs... v) { - //C8LOG_TRACE("Stack::AddSecondary"); + C8LOG_TRACE("Stack::AddSecondary"); data_.incrementSize(); deleted_.push_back(false); return stack_iterator_type(*this, getSize() - 1, parent, v...); } void swap(unsigned int a, unsigned int b) { - //C8LOG_TRACE("Stack::Swap(unsigned int)"); + C8LOG_TRACE("Stack::Swap(unsigned int)"); data_.swap(a, b); std::swap(deleted_[a], deleted_[b]); } void copy(unsigned int a, unsigned int b) { - //C8LOG_TRACE("Stack::Copy"); + C8LOG_TRACE("Stack::Copy"); data_.copy(a, b); if (deleted_[b] && !deleted_[a]) nDeleted_--; if (!deleted_[b] && deleted_[a]) nDeleted_++; @@ -423,7 +423,7 @@ namespace corsika { * should just be identiy. See class SecondaryView for an alternative implementation. */ unsigned int getIndexFromIterator(const unsigned int vI) const { - // this is too much: //C8LOG_TRACE("Stack::getIndexFromIterator({})={}", vI, vI); + // this is too much: C8LOG_TRACE("Stack::getIndexFromIterator({})={}", vI, vI); return vI; } diff --git a/corsika/stack/GeometryNodeStackExtension.hpp b/corsika/stack/GeometryNodeStackExtension.hpp index b92f16758e754bccd91a29e19378ec0ac602ec0c..6c0c89b74e18d294477dfe2cf303c834723eb3f6 100644 --- a/corsika/stack/GeometryNodeStackExtension.hpp +++ b/corsika/stack/GeometryNodeStackExtension.hpp @@ -8,7 +8,7 @@ #pragma once -#include <corsika/framework/logging/Logging.hpp> +//#include <corsika/framework/logging/Logging.hpp> #include <corsika/framework/stack/Stack.hpp> #include <tuple>