32 #include <boost/python.hpp> 33 #include "G4Version.hh" 34 #include "G4ParticleTable.hh" 44 G4bool(G4ParticleTable::*
f1_contains)(
const G4ParticleDefinition*)
const 45 = &G4ParticleTable::contains;
48 = &G4ParticleTable::contains;
52 = &G4ParticleTable::FindParticle;
55 = &G4ParticleTable::FindParticle;
58 const G4ParticleDefinition*)= &G4ParticleTable::FindParticle;
62 = &G4ParticleTable::FindAntiParticle;
65 = &G4ParticleTable::FindAntiParticle;
68 const G4ParticleDefinition*)= &G4ParticleTable::FindAntiParticle;
80 G4ParticleTable::G4PTblDicIterator*
81 theParticleIterator= particleTable-> GetIterator();
82 theParticleIterator-> reset();
83 while( (*theParticleIterator)() ){
84 G4ParticleDefinition* particle= theParticleIterator->
value();
85 particleList.append(&particle);
100 class_<G4ParticleTable, G4ParticleTable*, boost::noncopyable>
101 (
"G4ParticleTable",
"particle table", no_init)
103 .def(
"GetParticleTable", &G4ParticleTable::GetParticleTable,
104 return_value_policy<reference_existing_object>())
105 .staticmethod(
"GetParticleTable")
108 .def(
"entries", &G4ParticleTable::entries)
109 .def(
"size", &G4ParticleTable::size)
111 .def(
"GetParticle", &G4ParticleTable::GetParticle,
112 return_value_policy<reference_existing_object>())
113 .def(
"GetParticleName", &G4ParticleTable::GetParticleName,
114 return_value_policy<return_by_value>())
116 return_value_policy<reference_existing_object>())
118 return_value_policy<reference_existing_object>())
120 return_value_policy<reference_existing_object>())
122 return_value_policy<reference_existing_object>())
124 return_value_policy<reference_existing_object>())
126 return_value_policy<reference_existing_object>())
127 .def(
"DumpTable", &G4ParticleTable::DumpTable, f_DumpTable())
132 .def(
"SetVerboseLevel", &G4ParticleTable::SetVerboseLevel)
133 .def(
"GetVerboseLevel", &G4ParticleTable::GetVerboseLevel)
134 .def(
"SetReadiness", &G4ParticleTable::SetReadiness)
135 .def(
"GetReadiness", &G4ParticleTable::GetReadiness)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
void export_G4ParticleTable()
G4bool(G4ParticleTable::* f1_contains)(const G4ParticleDefinition *) const
G4ParticleDefinition *(G4ParticleTable::* f3_FindParticle)(const G4ParticleDefinition *)
G4ParticleDefinition *(G4ParticleTable::* f2_FindAntiParticle)(const G4String &)
std::string value(boost::any const &)
G4ParticleDefinition *(G4ParticleTable::* f1_FindParticle)(G4int)
G4ParticleDefinition *(G4ParticleTable::* f2_FindParticle)(const G4String &)
G4ParticleDefinition *(G4ParticleTable::* f3_FindAntiParticle)(const G4ParticleDefinition *)
G4ParticleDefinition *(G4ParticleTable::* f1_FindAntiParticle)(G4int)
G4bool(G4ParticleTable::* f2_contains)(const G4String &) const
list GetParticleList(G4ParticleTable *particleTable)