32 #include <boost/python.hpp>
50 if(particleTableCache.size() != particleTable-> size() ) {
51 particleTableCache.clear();
54 theParticleIterator-> reset();
55 while( (*theParticleIterator)() ){
57 particleTableCache.push_back(particle);
60 return particleTableCache.begin();
65 if(particleTableCache.size() != particleTable-> size() ) {
66 particleTableCache.clear();
69 theParticleIterator-> reset();
70 while( (*theParticleIterator)() ){
72 particleTableCache.push_back(particle);
75 return particleTableCache.end();
87 class_<PyG4ParticleList>(
"PyG4ParticleList",
"particle list")
88 .def(
"__iter__", iterator<PyG4ParticleList::ParticleList>())
std::vector< G4ParticleDefinition * > ParticleList
void export_PyG4ParticleList()
#define theParticleIterator
static G4ParticleTable * GetParticleTable()
static ParticleList particleTableCache
ParticleList::iterator p_iterator