31 #include <boost/python.hpp> 32 #include "G4ParticleTable.hh" 48 G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
49 if(particleTableCache.size() != particleTable->
size() ) {
50 particleTableCache.clear();
51 G4ParticleTable::G4PTblDicIterator*
52 theParticleIterator= particleTable-> GetIterator();
53 theParticleIterator-> reset();
54 while( (*theParticleIterator)() ){
55 G4ParticleDefinition* particle= theParticleIterator->
value();
56 particleTableCache.push_back(particle);
59 return particleTableCache.begin();
63 G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
64 if(particleTableCache.size() != particleTable->
size() ) {
65 particleTableCache.clear();
66 G4ParticleTable::G4PTblDicIterator*
67 theParticleIterator= particleTable-> GetIterator();
68 theParticleIterator-> reset();
69 while( (*theParticleIterator)() ){
70 G4ParticleDefinition* particle= theParticleIterator->
value();
71 particleTableCache.push_back(particle);
74 return particleTableCache.end();
86 class_<PyG4ParticleList>(
"PyG4ParticleList",
"particle list")
std::vector< G4ParticleDefinition * > ParticleList
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
static ParticleList particleTableCache
ParticleList::iterator p_iterator
void export_PyG4ParticleList()