ShowerParticleIterator.h
Go to the documentation of this file.
1 #ifndef _utl_ShowerParticleIterator_h_
2 #define _utl_ShowerParticleIterator_h_
3 
4 #include <iterator>
5 #include <cstddef>
6 
7 #include <utl/CoordinateSystemPtr.h>
8 
9 
10 namespace utl {
11 
12  class Particle;
13  class VShowerFileParticleIterator;
14 
33  public std::iterator<std::input_iterator_tag, Particle, ptrdiff_t> {
34 
35  public:
36  explicit ShowerParticleIterator(VShowerFileParticleIterator* const fileIt = nullptr,
38 
39  const Particle& operator*() const;
40  const Particle* operator->() const;
41 
46 
47  bool operator==(const ShowerParticleIterator& it) const;
48  bool operator!=(const ShowerParticleIterator& it) const
49  { return !operator==(it); }
50 
51  private:
52  void CheckReference() const;
53 
58  };
59 
60 }
61 
62 
63 #endif
Iterator to retrieve particles from utl::VShowerParticlList.
const Particle * operator->() const
bool operator!=(const ShowerParticleIterator &it) const
Describes a particle for Simulation.
Definition: Particle.h:26
ShowerParticleIterator & operator++()
Prefix increment.
bool operator==(const ShowerParticleIterator &it) const
VShowerFileParticleIterator * fParticles
Interface class for accessing a list of particles from a shower file.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
CoordinateSystemPtr fGroundCS
The reference frame for particle reading.
ShowerParticleIterator(VShowerFileParticleIterator *const fileIt=nullptr, const CoordinateSystemPtr &cs=CoordinateSystemPtr())
const Particle & operator*() const

, generated on Tue Sep 26 2023.