31 #include <boost/python.hpp> 32 #include "G4Version.hh" 33 #if G4VERSION_NUMBER >= 710 34 #include "G4NistManager.hh" 41 namespace pyG4NistManager {
44 G4Element*(G4NistManager::*f1_FindOrBuildElement)(G4int, G4bool)
45 = &G4NistManager::FindOrBuildElement;
47 G4Element*(G4NistManager::*f2_FindOrBuildElement)(
const G4String&, G4bool)
48 = &G4NistManager::FindOrBuildElement;
51 FindOrBuildElement, 1, 2)
54 void(G4NistManager::*f1_PrintElement)(const
G4String&) const
55 = &G4NistManager::PrintElement;
56 void(G4NistManager::*f2_PrintElement)(G4int) const
57 = &G4NistManager::PrintElement;
61 FindOrBuildMaterial, 1, 2)
64 G4Material*(G4NistManager::*f1_ConstructNewMaterial)
66 const
std::
vector<G4int>&, G4double, G4bool,
67 G4State, G4double, G4double)
68 = &G4NistManager::ConstructNewMaterial;
70 G4Material*(G4NistManager::*f2_ConstructNewMaterial)
71 (const G4String&, const
std::
vector<G4String>&,
72 const
std::
vector<G4double>&, G4double, G4bool,
73 G4State, G4double, G4double)
74 = &G4NistManager::ConstructNewMaterial;
77 ConstructNewMaterial, 4, 8)
80 ConstructNewGasMaterial, 4, 5)
84 using namespace pyG4NistManager;
93 #if G4VERSION_NUMBER >= 710 95 class_<G4NistManager, boost::noncopyable>
96 (
"G4NistManager",
"manager class for NIST materials", no_init)
98 .def(
"Instance", &G4NistManager::Instance,
99 return_value_policy<reference_existing_object>())
100 .staticmethod(
"Instance")
102 .def(
"SetVerbose", &G4NistManager::SetVerbose)
103 .def(
"GetVerbose", &G4NistManager::GetVerbose)
105 #if G4VERSION_NUMBER < 910 106 .def(
"RegisterElement", &G4NistManager::RegisterElement)
107 .def(
"DeRegisterElement", &G4NistManager::DeRegisterElement)
109 .def(
"GetElement", &G4NistManager::GetElement,
110 return_internal_reference<>())
111 .def(
"FindOrBuildElement", f1_FindOrBuildElement,
112 f_FindOrBuildElement()
113 [return_value_policy<reference_existing_object>()])
114 .def(
"FindOrBuildElement", f2_FindOrBuildElement,
115 f_FindOrBuildElement()
116 [return_value_policy<reference_existing_object>()])
117 .def(
"GetNumberOfElements", &G4NistManager::GetNumberOfElements)
118 .def(
"GetZ", &G4NistManager::GetZ)
119 .def(
"GetIsotopeMass", &G4NistManager::GetIsotopeMass)
120 .def(
"PrintElement", f1_PrintElement)
121 .def(
"PrintElement", f2_PrintElement)
122 .def(
"PrintG4Element", &G4NistManager::PrintG4Element)
124 #if G4VERSION_NUMBER < 910 125 .def(
"RegisterMaterial", &G4NistManager::RegisterMaterial)
126 .def(
"DeRegisterMaterial", &G4NistManager::DeRegisterMaterial)
128 .def(
"GetMaterial", &G4NistManager::GetMaterial,
129 return_value_policy<reference_existing_object>())
130 .def(
"FindOrBuildMaterial", &G4NistManager::FindOrBuildMaterial,
131 f_FindOrBuildMaterial()
132 [return_value_policy<reference_existing_object>()])
133 .def(
"ConstructNewMaterial", f1_ConstructNewMaterial,
134 f_ConstructNewMaterial()
135 [return_value_policy<reference_existing_object>()])
136 .def(
"ConstructNewMaterial", f2_ConstructNewMaterial,
137 f_ConstructNewMaterial()
138 [return_value_policy<reference_existing_object>()])
139 #if G4VERSION_NUMBER >= 910 140 .def(
"ConstructNewGasMaterial", &G4NistManager::ConstructNewGasMaterial,
141 f_ConstructNewGasMaterial()
142 [return_value_policy<reference_existing_object>()])
144 .def(
"GetNumberOfMaterials", &G4NistManager::GetNumberOfMaterials)
145 .def(
"ListMaterials", &G4NistManager::ListMaterials)
146 .def(
"PrintG4Material", &G4NistManager::PrintG4Material)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void export_G4NistManager()