List of all members | Public Member Functions | Private Attributes
ShowerInventorNS::ShowerInventorParticleIterator Class Reference

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>

Inheritance diagram for ShowerInventorNS::ShowerInventorParticleIterator:
Inheritance graph
[legend]

Public Member Functions

virtual utl::ParticleGetOneParticle (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
 
ShowerInventorfShowerInventor
 

Detailed Description

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.

Author
T. Paul
Date
13 August 2009

Definition at line 32 of file ShowerInventorParticleIterator.h.

Constructor & Destructor Documentation

ShowerInventorParticleIterator::ShowerInventorParticleIterator ( ShowerInventor m)

Definition at line 9 of file ShowerInventorParticleIterator.cc.

ShowerInventorParticleIterator::~ShowerInventorParticleIterator ( )
virtual

Definition at line 17 of file ShowerInventorParticleIterator.cc.

Member Function Documentation

Particle * ShowerInventorParticleIterator::GetOneParticle ( const utl::CoordinateSystemPtr cs)
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().

void ShowerInventorParticleIterator::Rewind ( )
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.

Member Data Documentation

bool ShowerInventorNS::ShowerInventorParticleIterator::fIteratorValid
private

Definition at line 47 of file ShowerInventorParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

unsigned int ShowerInventorNS::ShowerInventorParticleIterator::fNumParticles
private

Definition at line 44 of file ShowerInventorParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

const unsigned int ShowerInventorNS::ShowerInventorParticleIterator::fNumRequested
private

Definition at line 45 of file ShowerInventorParticleIterator.h.

Referenced by GetOneParticle().

ShowerInventor* ShowerInventorNS::ShowerInventorParticleIterator::fShowerInventor
private

Definition at line 43 of file ShowerInventorParticleIterator.h.

Referenced by GetOneParticle().


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.