31 #include <boost/python.hpp> 32 #include "G4Version.hh" 33 #include "G4ParticleTable.hh" 43 G4bool(G4ParticleTable::*
f1_contains)(
const G4ParticleDefinition*)
const 44 = &G4ParticleTable::contains;
47 = &G4ParticleTable::contains;
51 = &G4ParticleTable::FindParticle;
54 = &G4ParticleTable::FindParticle;
57 const G4ParticleDefinition*)= &G4ParticleTable::FindParticle;
61 = &G4ParticleTable::FindAntiParticle;
64 = &G4ParticleTable::FindAntiParticle;
67 const G4ParticleDefinition*)= &G4ParticleTable::FindAntiParticle;
79 G4ParticleTable::G4PTblDicIterator*
80 theParticleIterator= particleTable-> GetIterator();
81 theParticleIterator-> reset();
82 while( (*theParticleIterator)() ){
83 G4ParticleDefinition* particle= theParticleIterator->
value();
84 particleList.append(&particle);
99 class_<G4ParticleTable, G4ParticleTable*, boost::noncopyable>
100 (
"G4ParticleTable",
"particle table", no_init)
102 .def(
"GetParticleTable", &G4ParticleTable::GetParticleTable,
103 return_value_policy<reference_existing_object>())
104 .staticmethod(
"GetParticleTable")
107 .def(
"entries", &G4ParticleTable::entries)
110 .def(
"GetParticle", &G4ParticleTable::GetParticle,
111 return_value_policy<reference_existing_object>())
112 .def(
"GetParticleName", &G4ParticleTable::GetParticleName,
113 return_value_policy<return_by_value>())
115 return_value_policy<reference_existing_object>())
117 return_value_policy<reference_existing_object>())
119 return_value_policy<reference_existing_object>())
121 return_value_policy<reference_existing_object>())
123 return_value_policy<reference_existing_object>())
125 return_value_policy<reference_existing_object>())
126 .def(
"DumpTable", &G4ParticleTable::DumpTable, f_DumpTable())
131 .def(
"SetVerboseLevel", &G4ParticleTable::SetVerboseLevel)
132 .def(
"GetVerboseLevel", &G4ParticleTable::GetVerboseLevel)
133 .def(
"SetReadiness", &G4ParticleTable::SetReadiness)
134 .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
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
G4ParticleDefinition *(G4ParticleTable::* f3_FindParticle)(const G4ParticleDefinition *)
G4ParticleDefinition *(G4ParticleTable::* f2_FindAntiParticle)(const G4String &)
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)