#ifndef _io_SenecaShowerFileParticleIterator_h_ #define _io_SenecaShowerFileParticleIterator_h_ #include #include #include #include #include using namespace std; namespace utl { class Particle; } namespace io { /** \class SenecaShowerFileParticleIterator \brief \author Jeff Allen \date 8 Sep 2006 \ingroup seneca */ class SenecaShowerFileParticleIterator : public utl::VShowerFileParticleIterator { public: SenecaShowerFileParticleIterator(); SenecaShowerFileParticleIterator(SenecaFileParser* const senecaParser); Status SetSenecaFileParser(SenecaFileParser* const senecaParser); virtual ~SenecaShowerFileParticleIterator(); virtual utl::Particle* GetOneParticle(); virtual void Rewind(); int SenecaToDPAParticle(int senecaParticleID); protected: virtual utl::CoordinateSystemPtr ComputeExternalShowerCoordinateSystem(const utl::CoordinateSystemPtr& cs); private: SenecaFileParser* fSenecaFile; SenecaParticleRecord* fCurrentSenecaParticle; bool fIteratorValid; utl::Particle fCurrentParticle; utl::CoordinateSystemPtr fSenecaCoordinateSystem; utl::Particle* SenecaToDPAParticle(); unsigned int fOriginalPosition; unsigned int fCurrentPosition; unsigned int fParticleNumber; }; } #endif