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

Implementation of the VShowerFileParticleIterator for an Aires generated shower file. More...

#include <AiresShowerFileParticleIterator.h>

Inheritance diagram for io::AiresShowerFileParticleIterator:
Inheritance graph
[legend]

Public Member Functions

 AiresShowerFileParticleIterator (AiresShowerFile &)
 
virtual utl::ParticleGetOneParticle (const utl::CoordinateSystemPtr &cs)
 Member function to fetch the next particle. More...
 
virtual void Rewind ()
 Rewind the particle list in the shower file to the beginning. More...
 
virtual ~AiresShowerFileParticleIterator ()
 

Protected Member Functions

virtual utl::CoordinateSystemPtr ComputeExternalShowerCoordinateSystem (const utl::CoordinateSystemPtr &ptr)
 Compute the coordinate system for the ground particle file. More...
 

Private Attributes

bool fAltType
 
int fChannel
 
utl::Particle fCurrentParticle
 
int fCurrentRecordNumber
 
double fDoubleData [99]
 
int fEndOfList
 
AiresShowerFilefFile
 
int fGroundParticleCodeIndex
 
int fHeadOfList
 
int fIntData [99]
 
int fIrc
 
bool fIteratorValid
 
int fLogEIndex
 
int fLogRIndex
 
int fThetaIndex
 
int fTimeIndex
 
int fUxIndex
 
int fUyIndex
 
int fVerbosity
 
int fWeightIndex
 

Detailed Description

Implementation of the VShowerFileParticleIterator for an Aires generated shower file.

Author
Troy Porter
Date
22 May 2003

Definition at line 33 of file AiresShowerFileParticleIterator.h.

Constructor & Destructor Documentation

AiresShowerFileParticleIterator::AiresShowerFileParticleIterator ( AiresShowerFile theFile)
AiresShowerFileParticleIterator::~AiresShowerFileParticleIterator ( )
virtual

Definition at line 77 of file AiresShowerFileParticleIterator.cc.

Member Function Documentation

CoordinateSystemPtr AiresShowerFileParticleIterator::ComputeExternalShowerCoordinateSystem ( const utl::CoordinateSystemPtr ptr)
protectedvirtual

Compute the coordinate system for the ground particle file.

Definition at line 148 of file AiresShowerFileParticleIterator.cc.

References io::Aires::AiresAzimuthToAuger(), and utl::deg.

Particle * AiresShowerFileParticleIterator::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 81 of file AiresShowerFileParticleIterator.cc.

References io::Aires::AiresToPDG(), io::AiresWrapper::crogotorec(), ERROR, utl::Particle::eShower, fAltType, fChannel, fCurrentParticle, fCurrentRecordNumber, fDoubleData, fEndOfList, fGroundParticleCodeIndex, fIntData, fIrc, fIteratorValid, fLogEIndex, fLogRIndex, fThetaIndex, fTimeIndex, fUxIndex, fUyIndex, fVerbosity, fWeightIndex, io::AiresWrapper::getcrorecord(), utl::GeV, utl::m, ns, std::pow(), utl::rad, and sqrt().

Referenced by io::AiresShowerFile::Read().

void AiresShowerFileParticleIterator::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 136 of file AiresShowerFileParticleIterator.cc.

References io::AiresWrapper::crogotorec(), io::AiresWrapper::crorecnumber(), fChannel, fCurrentRecordNumber, fHeadOfList, fIrc, fIteratorValid, and fVerbosity.

Referenced by io::AiresShowerFile::Read().

Member Data Documentation

bool io::AiresShowerFileParticleIterator::fAltType
private

Definition at line 59 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fChannel
private

Definition at line 57 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

utl::Particle io::AiresShowerFileParticleIterator::fCurrentParticle
private

Definition at line 53 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fCurrentRecordNumber
private

Definition at line 70 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

double io::AiresShowerFileParticleIterator::fDoubleData[99]
private
int io::AiresShowerFileParticleIterator::fEndOfList
private
AiresShowerFile& io::AiresShowerFileParticleIterator::fFile
private

Definition at line 52 of file AiresShowerFileParticleIterator.h.

Referenced by AiresShowerFileParticleIterator().

int io::AiresShowerFileParticleIterator::fGroundParticleCodeIndex
private

Definition at line 61 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fHeadOfList
private

Definition at line 58 of file AiresShowerFileParticleIterator.h.

Referenced by AiresShowerFileParticleIterator(), and Rewind().

int io::AiresShowerFileParticleIterator::fIntData[99]
private
int io::AiresShowerFileParticleIterator::fIrc
private

Definition at line 57 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

bool io::AiresShowerFileParticleIterator::fIteratorValid
private

Definition at line 72 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

int io::AiresShowerFileParticleIterator::fLogEIndex
private

Definition at line 62 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fLogRIndex
private

Definition at line 62 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fThetaIndex
private

Definition at line 63 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fTimeIndex
private

Definition at line 65 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fUxIndex
private

Definition at line 64 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fUyIndex
private

Definition at line 64 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().

int io::AiresShowerFileParticleIterator::fVerbosity
private

Definition at line 57 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle(), and Rewind().

int io::AiresShowerFileParticleIterator::fWeightIndex
private

Definition at line 65 of file AiresShowerFileParticleIterator.h.

Referenced by GetOneParticle().


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

, generated on Tue Sep 26 2023.