13 #include <cppunit/extensions/HelperMacros.h>
17 #include <utl/VShowerFileParticleIterator.h>
18 #include <utl/CoordinateSystem.h>
19 #include <utl/ShowerParticleIterator.h>
20 #include <utl/Particle.h>
21 #include <utl/Point.h>
22 #include <utl/TimeInterval.h>
23 #include <utl/Vector.h>
24 #include <utl/AugerException.h>
25 #include <tst/Verify.h>
37 CPPUNIT_TEST(testConstruction);
38 CPPUNIT_TEST(testGetParticles);
44 CPPUNIT_TEST(testWithSkip);
45 CPPUNIT_TEST(testWithSkipAll);
46 CPPUNIT_TEST_SUITE_END();
62 fCS = utl::CoordinateSystem::GetRootCoordinateSystem();
68 delete fShowerParticleIterator1;
69 delete fShowerParticleIterator2;
77 utl::CoordinateSystem::GetRootCoordinateSystem()),
79 utl::CoordinateSystem::GetRootCoordinateSystem()),
98 CPPUNIT_ASSERT(fIter !=0);
103 fIter->GetOneParticle(fCS);
109 unsigned int count = 0;
110 while (fIter->GetOneParticle(fCS)) count++;
111 CPPUNIT_ASSERT(Verify<Equal>(count, fInserted));
119 while (count--) fIter->GetOneParticle(fCS);
140 const unsigned int toSkip = 2;
144 unsigned int count = 0;
147 CPPUNIT_ASSERT(Verify<Equal>(count, fInserted - toSkip));
152 const unsigned int toSkip = fInserted;
Iterator to retrieve particles from utl::VShowerParticlList.
testShowerFileParticleIterator * fIter
Describes a particle for Simulation.
ShowerParticleIterator * fShowerParticleIterator1
ShowerParticleIterator * fShowerParticleIterator2
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
Base class to report exceptions in IO.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
void addParticles(testShowerFileParticleIterator &where)
virtual void Rewind()
Rewind the particle list in the shower file to the beginning.
A TimeInterval is used to represent time elapsed between two events.
virtual utl::Particle * GetOneParticle(const utl::CoordinateSystemPtr &cs)
Member function to fetch the next particle.
void addParticle(testShowerFileParticleIterator &where)
void AddParticle(const utl::Particle &p)
void testUninitialisedException()