#include <SenecaShowerFileParticleIterator.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... | |
SenecaShowerFileParticleIterator () | |
SenecaShowerFileParticleIterator (SenecaFileParser *const senecaParser) | |
int | SenecaToDPAParticle (int senecaParticleID) |
Status | SetSenecaFileParser (SenecaFileParser *const senecaParser) |
virtual | ~SenecaShowerFileParticleIterator () |
Private Member Functions | |
utl::Particle * | SenecaToDPAParticle (const utl::CoordinateSystemPtr &groundCS) |
Private Attributes | |
utl::Particle | fCurrentParticle |
unsigned int | fCurrentPosition |
SenecaParticleRecord * | fCurrentSenecaParticle |
bool | fIteratorValid |
unsigned int | fOriginalPosition |
utl::CoordinateSystemPtr | fSenecaCoordinateSystem |
SenecaFileParser * | fSenecaFile |
Definition at line 29 of file SenecaShowerFileParticleIterator.h.
SenecaShowerFileParticleIterator::SenecaShowerFileParticleIterator | ( | ) |
Definition at line 33 of file SenecaShowerFileParticleIterator.cc.
SenecaShowerFileParticleIterator::SenecaShowerFileParticleIterator | ( | SenecaFileParser *const | senecaParser | ) |
Definition at line 12 of file SenecaShowerFileParticleIterator.cc.
References io::eSuccess, fCurrentPosition, io::SenecaFileParser::FileStatus(), fIteratorValid, fOriginalPosition, fSenecaFile, and io::SenecaFileParser::GetPosition().
|
virtual |
Definition at line 43 of file SenecaShowerFileParticleIterator.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 49 of file SenecaShowerFileParticleIterator.cc.
References io::eSuccess, fCurrentPosition, fCurrentSenecaParticle, fSenecaFile, io::SenecaFileParser::GetParticleRecord(), io::SenecaFileParser::GetPosition(), io::SenecaFileParser::ReadParticle(), and SenecaToDPAParticle().
|
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 | ) |
Definition at line 102 of file SenecaShowerFileParticleIterator.cc.
References utl::Particle::eAntiLambda, utl::Particle::eAntiMuon, utl::Particle::eAntiNeutron, utl::Particle::eAntiNuElectron, utl::Particle::eAntiNuMuon, utl::Particle::eAntiNuTau, utl::Particle::eAntiProton, utl::Particle::eElectron, utl::Particle::eEta, utl::Particle::eKaon0L, utl::Particle::eKaon0S, utl::Particle::eKaonMinus, utl::Particle::eKaonPlus, utl::Particle::eLambda, utl::Particle::eMuon, utl::Particle::eNeutron, utl::Particle::eNuElectron, utl::Particle::eNuMuon, utl::Particle::eNuTau, utl::Particle::ePhoton, utl::Particle::ePiMinus, utl::Particle::ePiPlus, utl::Particle::ePiZero, utl::Particle::ePositron, utl::Particle::eProton, and utl::Particle::eUndefined.
Referenced by GetOneParticle().
|
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 | ) |
Definition at line 172 of file SenecaShowerFileParticleIterator.cc.
References io::eSuccess, fCurrentPosition, io::SenecaFileParser::FileStatus(), fIteratorValid, fOriginalPosition, fSenecaFile, and io::SenecaFileParser::GetPosition().
|
private |
Definition at line 47 of file SenecaShowerFileParticleIterator.h.
|
private |
Definition at line 53 of file SenecaShowerFileParticleIterator.h.
Referenced by GetOneParticle(), Rewind(), SenecaShowerFileParticleIterator(), and SetSenecaFileParser().
|
private |
Definition at line 44 of file SenecaShowerFileParticleIterator.h.
Referenced by GetOneParticle().
|
private |
Definition at line 45 of file SenecaShowerFileParticleIterator.h.
Referenced by SenecaShowerFileParticleIterator(), and SetSenecaFileParser().
|
private |
Definition at line 52 of file SenecaShowerFileParticleIterator.h.
Referenced by Rewind(), SenecaShowerFileParticleIterator(), and SetSenecaFileParser().
|
private |
Definition at line 48 of file SenecaShowerFileParticleIterator.h.
|
private |
Definition at line 43 of file SenecaShowerFileParticleIterator.h.
Referenced by GetOneParticle(), Rewind(), SenecaShowerFileParticleIterator(), and SetSenecaFileParser().