32 #include <boost/python.hpp>
35 using namespace boost::python;
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()
const XML_Char int const XML_Char * value
const G4ParticleDefinition const G4Material *G4double range
#define theParticleIterator
static G4ParticleTable * GetParticleTable()
static ParticleList particleTableCache
ParticleList::iterator p_iterator