|
CORSIKA
@c8_version@
The framework to simulate particle cascades for astroparticle physics
|
The base class to define the readout of particle properties from a particle stack. More...
#include <ParticleBase.hpp>

Public Types | |
| typedef TStackIterator | stack_iterator_type |
Public Member Functions | |
| ParticleBase (ParticleBase &&)=delete | |
| ParticleBase (ParticleBase const &)=delete | |
| ParticleBase | operator= (ParticleBase &&)=delete |
| ParticleBase | operator= (ParticleBase const &)=delete |
| void | erase () |
| Delete this particle on the stack. More... | |
| bool | isErased () const |
| Method to retrieve the status of the Particle. More... | |
| template<typename... TArgs> | |
| stack_iterator_type | addSecondary (const TArgs... args) |
| Add a secondary particle based on *this on the stack. More... | |
| stack_iterator_type & | getIterator () |
| return the corresponding TStackIterator for this particle | |
| const stack_iterator_type & | getIterator () const |
Protected Member Functions | |
Access to underlying stack fData, these are service | |
function for user classes. User code can only rely on getIndex and getStackData to retrieve data | |
| auto & | getStackData () |
| const auto & | getStackData () const |
| auto & | getStack () |
| const auto & | getStack () const |
| std::size_t | getIndex () const |
| return the index number of the underlying iterator object | |
The base class to define the readout of particle properties from a particle stack.
Every stack must implement this readout via the ParticleBase class.
The TStackIterator template argument is derived from StackIteratorInterface, which is of type template <typename StackData, template <typename> typename ParticleInterface> class StackIteratorInterface : public ParticleInterface<StackIteratorInterface<StackData, ParticleInterface>>
where StackData must refer to a Stack type, and ParticleInterface<StackIteratorInterface> is the corresponding particle readout class.
Thus, StackIteratorInterface is a CRTP class, injecting the full StackIteratorInterface machinery into the ParticleInterface (aka ParticleBase) type!
The declartion of a StackIteratorInterface type simultaneously declares the corresponding ParticleInterface type.
Furthermore, the operator* of the StackIteratorInterface returns a static_cast to the ParticleInterface type, allowing a direct readout of the particle data from the iterator.
Definition at line 43 of file ParticleBase.hpp.
|
inline |
Add a secondary particle based on *this on the stack.
| args | is a variadic list of input data that has to match the function description in the user defined ParticleInterface::AddSecondary(...) |
Definition at line 78 of file ParticleBase.hpp.
|
inline |
Delete this particle on the stack.
The corresponding iterator will be invalidated by this operation
Definition at line 62 of file ParticleBase.hpp.
|
inline |
Method to retrieve the status of the Particle.
Is it already deleted? Or not.
Definition at line 68 of file ParticleBase.hpp.