List of all members | Public Member Functions | Private Member Functions | Private Attributes
io::SenecaShowerFileParticleIterator Class Reference

#include <SenecaShowerFileParticleIterator.h>

Inheritance diagram for io::SenecaShowerFileParticleIterator:
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...
 
 SenecaShowerFileParticleIterator ()
 
 SenecaShowerFileParticleIterator (SenecaFileParser *const senecaParser)
 
int SenecaToDPAParticle (int senecaParticleID)
 
Status SetSenecaFileParser (SenecaFileParser *const senecaParser)
 
virtual ~SenecaShowerFileParticleIterator ()
 

Private Member Functions

utl::ParticleSenecaToDPAParticle (const utl::CoordinateSystemPtr &groundCS)
 

Private Attributes

utl::Particle fCurrentParticle
 
unsigned int fCurrentPosition
 
SenecaParticleRecordfCurrentSenecaParticle
 
bool fIteratorValid
 
unsigned int fOriginalPosition
 
utl::CoordinateSystemPtr fSenecaCoordinateSystem
 
SenecaFileParserfSenecaFile
 

Detailed Description

Author
Jeff Allen
Date
8 Sep 2006

Definition at line 29 of file SenecaShowerFileParticleIterator.h.

Constructor & Destructor Documentation

SenecaShowerFileParticleIterator::SenecaShowerFileParticleIterator ( )

Definition at line 33 of file SenecaShowerFileParticleIterator.cc.

SenecaShowerFileParticleIterator::SenecaShowerFileParticleIterator ( SenecaFileParser *const  senecaParser)
SenecaShowerFileParticleIterator::~SenecaShowerFileParticleIterator ( )
virtual

Definition at line 43 of file SenecaShowerFileParticleIterator.cc.

Member Function Documentation

Particle * SenecaShowerFileParticleIterator::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 49 of file SenecaShowerFileParticleIterator.cc.

References io::eSuccess, fCurrentPosition, fCurrentSenecaParticle, fSenecaFile, io::SenecaFileParser::GetParticleRecord(), io::SenecaFileParser::GetPosition(), io::SenecaFileParser::ReadParticle(), and SenecaToDPAParticle().

void SenecaShowerFileParticleIterator::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 67 of file SenecaShowerFileParticleIterator.cc.

References fCurrentPosition, fOriginalPosition, fSenecaFile, io::SenecaFileParser::GetPosition(), and io::SenecaFileParser::GotoPosition().

int SenecaShowerFileParticleIterator::SenecaToDPAParticle ( int  senecaParticleID)
utl::Particle * io::SenecaShowerFileParticleIterator::SenecaToDPAParticle ( const utl::CoordinateSystemPtr groundCS)
private

Definition at line 75 of file SenecaShowerFileParticleIterator.cc.

References utl::Particle::eUndefined, utl::GeV, utl::m, and ns.

Status SenecaShowerFileParticleIterator::SetSenecaFileParser ( SenecaFileParser *const  senecaParser)

Member Data Documentation

utl::Particle io::SenecaShowerFileParticleIterator::fCurrentParticle
private

Definition at line 47 of file SenecaShowerFileParticleIterator.h.

unsigned int io::SenecaShowerFileParticleIterator::fCurrentPosition
private
SenecaParticleRecord* io::SenecaShowerFileParticleIterator::fCurrentSenecaParticle
private

Definition at line 44 of file SenecaShowerFileParticleIterator.h.

Referenced by GetOneParticle().

bool io::SenecaShowerFileParticleIterator::fIteratorValid
private
unsigned int io::SenecaShowerFileParticleIterator::fOriginalPosition
private
utl::CoordinateSystemPtr io::SenecaShowerFileParticleIterator::fSenecaCoordinateSystem
private

Definition at line 48 of file SenecaShowerFileParticleIterator.h.

SenecaFileParser* io::SenecaShowerFileParticleIterator::fSenecaFile
private

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

, generated on Tue Sep 26 2023.