Iterator that generates particles "on-the-fly" . This uses the machinery in ShowerInventor to fetch particles created on-the-fly, and hook them to the SimShowerData class through a VShowerFileParticleIterator. More...
#include <ShowerInventorParticleIterator.h>
Public Member Functions | |
virtual utl::Particle * | GetOneParticle (const utl::CoordinateSystemPtr &groundCS) |
Member function to fetch the next particle. More... | |
virtual void | Rewind () |
Rewind the particle list in the shower file to the beginning. More... | |
ShowerInventorParticleIterator (ShowerInventor *m) | |
virtual | ~ShowerInventorParticleIterator () |
Private Attributes | |
bool | fIteratorValid |
unsigned int | fNumParticles |
const unsigned int | fNumRequested |
ShowerInventor * | fShowerInventor |
Iterator that generates particles "on-the-fly" . This uses the machinery in ShowerInventor to fetch particles created on-the-fly, and hook them to the SimShowerData class through a VShowerFileParticleIterator.
Definition at line 32 of file ShowerInventorParticleIterator.h.
ShowerInventorParticleIterator::ShowerInventorParticleIterator | ( | ShowerInventor * | m | ) |
Definition at line 9 of file ShowerInventorParticleIterator.cc.
|
virtual |
Definition at line 17 of file ShowerInventorParticleIterator.cc.
|
virtual |
Member function to fetch the next particle.
This method has to return a pointer to the current particle in the shower file. Then it steps the cursor in the shower file forward. This corresponds to the way a typical interface library for Aires or CORSIKA provides access to the particles on the ground.
If no more particles are available, return a null pointer.
Call Rewind() before calling this function. This puts the underlying library into a defined state.
It is the responsibility of the concrete implementation to react appropriately to illegal calls to GetOneParticle()
Implements utl::VShowerFileParticleIterator.
Definition at line 29 of file ShowerInventorParticleIterator.cc.
References fIteratorValid, fNumParticles, fNumRequested, fShowerInventor, and ShowerInventorNS::ShowerInventor::GetOneParticle().
|
virtual |
Rewind the particle list in the shower file to the beginning.
After a call to this function, calls to GetOneParticle() start returning particles starting from the first particle recorded for the shower.
Implements utl::VShowerFileParticleIterator.
Definition at line 22 of file ShowerInventorParticleIterator.cc.
References fIteratorValid, and fNumParticles.
|
private |
Definition at line 47 of file ShowerInventorParticleIterator.h.
Referenced by GetOneParticle(), and Rewind().
|
private |
Definition at line 44 of file ShowerInventorParticleIterator.h.
Referenced by GetOneParticle(), and Rewind().
|
private |
Definition at line 45 of file ShowerInventorParticleIterator.h.
Referenced by GetOneParticle().
|
private |
Definition at line 43 of file ShowerInventorParticleIterator.h.
Referenced by GetOneParticle().