diff --git a/Documentation/Examples/stack_example.cc b/Documentation/Examples/stack_example.cc index 3d28e5566b2f53df940bf2769e85c4331d276e87..3431db4594474e0e25c0ddbe41a1ccdbef108ee9 100644 --- a/Documentation/Examples/stack_example.cc +++ b/Documentation/Examples/stack_example.cc @@ -19,9 +19,10 @@ #include <iomanip> #include <iostream> +using namespace corsika; using namespace corsika::units::si; using namespace corsika::stack; -using namespace corsika; +using namespace corsika::geometry; using namespace std; void fill(corsika::stack::super_stupid::SuperStupidStack& s) { diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h index ff92fa2383e2614b2f6fa4438d6ca492d77608e6..0492852f0978316861daee0cc3c6114b73f07c34 100644 --- a/Framework/StackInterface/Stack.h +++ b/Framework/StackInterface/Stack.h @@ -142,6 +142,8 @@ namespace corsika::stack { StackIterator GetNextParticle() { return last(); } protected: + unsigned int GetIndexFromIterator(const unsigned int vI) const { return vI; } + StackData& GetStackData() { return static_cast<StackData&>(*this); } const StackData& GetStackData() const { return static_cast<const StackData&>(*this); } }; diff --git a/Framework/StackInterface/StackIteratorInterface.h b/Framework/StackInterface/StackIteratorInterface.h index 74f1a7802e1d55c0739686496d0ba568557785ac..783a6924d2405f99b5580f65b0d637da79fd187f 100644 --- a/Framework/StackInterface/StackIteratorInterface.h +++ b/Framework/StackInterface/StackIteratorInterface.h @@ -237,6 +237,7 @@ namespace corsika::stack { */ ///@{ inline unsigned int GetIndex() const { return fIndex; } + // inline unsigned int GetIndex() const { return fData->GetIndexFromIterator(fIndex); } inline const StackType& GetStack() const { return *fData; } inline const StackData& GetStackData() const { return fData->GetStackData(); } ///@} diff --git a/Framework/StackInterface/StackView.h b/Framework/StackInterface/StackView.h index f4d72e22ba78fcc75e5ed07af03b361ba64053d3..f7eb8b5da94b707f57896fe88517a0fb544a7e37 100644 --- a/Framework/StackInterface/StackView.h +++ b/Framework/StackInterface/StackView.h @@ -1,6 +1,7 @@ #ifndef _include_corsika_stack_stackview_h_ #define _include_corsika_stack_stackview_h_ +#include <vector> namespace corsika::stack {