ShowerInventorParticleIterator.cc
Go to the documentation of this file.
2 #include "ShowerInventor.h"
3 #include <utl/Particle.h>
4 #include <utl/AugerException.h>
5 
6 using namespace utl;
7 using namespace ShowerInventorNS;
8 
9 ShowerInventorParticleIterator::ShowerInventorParticleIterator(ShowerInventor* si) :
10  fShowerInventor(si),
11  fNumParticles(0),
12  fNumRequested(si->GetNumRequestedParticles()),
13  fIteratorValid(false)
14 {
15 }
16 
18 {
19 }
20 
21 void
23 {
24  fNumParticles = 0;
25  fIteratorValid = true;
26 }
27 
28 Particle*
30 {
31  if (!fIteratorValid)
32  throw IOFailureException("ShowerInventorParticleFileIterator is not valid");
33 
35  fIteratorValid = false;
36  return 0;
37  }
38  else {
39  ++fNumParticles;
41  }
42 
43 }
44 
45 // Configure (x)emacs for this file ...
46 // Local Variables:
47 // mode:c++
48 // compile-command: "make -C .. -k run-testParticleTests"
49 // End:
Describes a particle for Simulation.
Definition: Particle.h:26
Base class to report exceptions in IO.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
virtual void Rewind()
Rewind the particle list in the shower file to the beginning.
Generate hypothetical particle distributions in the shower plane.
virtual utl::Particle * GetOneParticle(const utl::CoordinateSystemPtr &groundCS)
Member function to fetch the next particle.

, generated on Tue Sep 26 2023.