31 #include <boost/python.hpp>
34 using namespace boost::python;
49 if(particleTableCache.size() !=
static_cast<size_t>(particleTable-> size()) ) {
50 particleTableCache.clear();
52 theParticleIterator-> reset();
53 while( (*theParticleIterator)() ){
55 particleTableCache.push_back(particle);
58 return particleTableCache.begin();
63 if(particleTableCache.size() !=
static_cast<size_t>(particleTable-> size()) ) {
64 particleTableCache.clear();
66 theParticleIterator-> reset();
67 while( (*theParticleIterator)() ){
69 particleTableCache.push_back(particle);
72 return particleTableCache.end();
84 class_<PyG4ParticleList>(
"PyG4ParticleList",
"particle list")
85 .def(
"__iter__", iterator<PyG4ParticleList::ParticleList>())