33 #include <boost/python.hpp>
36 using namespace boost::python;
51 if(particleTableCache.size() != particleTable-> size() ) {
52 particleTableCache.clear();
54 theParticleIterator= particleTable-> GetIterator();
55 theParticleIterator-> reset();
56 while( (*theParticleIterator)() ){
58 particleTableCache.push_back(particle);
61 return particleTableCache.begin();
66 if(particleTableCache.size() != particleTable-> size() ) {
67 particleTableCache.clear();
69 theParticleIterator= particleTable-> GetIterator();
70 theParticleIterator-> reset();
71 while( (*theParticleIterator)() ){
73 particleTableCache.push_back(particle);
76 return particleTableCache.end();
88 class_<PyG4ParticleList>(
"PyG4ParticleList",
"particle list")
89 .def(
"__iter__", iterator<PyG4ParticleList::ParticleList>())