32 #include <boost/python.hpp> 33 #include "G4Version.hh" 34 #if G4VERSION_NUMBER >= 710 35 #include "G4NistManager.hh" 42 namespace pyG4NistManager {
45 G4Element*(G4NistManager::*f1_FindOrBuildElement)(G4int, G4bool)
46 = &G4NistManager::FindOrBuildElement;
48 G4Element*(G4NistManager::*f2_FindOrBuildElement)(
const G4String&, G4bool)
49 = &G4NistManager::FindOrBuildElement;
52 FindOrBuildElement, 1, 2)
55 void(G4NistManager::*f1_PrintElement)(const
G4String&) const
56 = &G4NistManager::PrintElement;
57 void(G4NistManager::*f2_PrintElement)(G4int) const
58 = &G4NistManager::PrintElement;
62 FindOrBuildMaterial, 1, 2)
65 G4Material*(G4NistManager::*f1_ConstructNewMaterial)
67 const
std::
vector<G4int>&, G4double, G4bool,
68 G4State, G4double, G4double)
69 = &G4NistManager::ConstructNewMaterial;
71 G4Material*(G4NistManager::*f2_ConstructNewMaterial)
72 (const G4String&, const
std::
vector<G4String>&,
73 const
std::
vector<G4double>&, G4double, G4bool,
74 G4State, G4double, G4double)
75 = &G4NistManager::ConstructNewMaterial;
78 ConstructNewMaterial, 4, 8)
81 ConstructNewGasMaterial, 4, 5)
85 using namespace pyG4NistManager;
94 #if G4VERSION_NUMBER >= 710 96 class_<G4NistManager, boost::noncopyable>
97 (
"G4NistManager",
"manager class for NIST materials", no_init)
99 .def(
"Instance", &G4NistManager::Instance,
100 return_value_policy<reference_existing_object>())
101 .staticmethod(
"Instance")
103 .def(
"SetVerbose", &G4NistManager::SetVerbose)
104 .def(
"GetVerbose", &G4NistManager::GetVerbose)
106 #if G4VERSION_NUMBER < 910 107 .def(
"RegisterElement", &G4NistManager::RegisterElement)
108 .def(
"DeRegisterElement", &G4NistManager::DeRegisterElement)
110 .def(
"GetElement", &G4NistManager::GetElement,
111 return_internal_reference<>())
112 .def(
"FindOrBuildElement", f1_FindOrBuildElement,
113 f_FindOrBuildElement()
114 [return_value_policy<reference_existing_object>()])
115 .def(
"FindOrBuildElement", f2_FindOrBuildElement,
116 f_FindOrBuildElement()
117 [return_value_policy<reference_existing_object>()])
118 .def(
"GetNumberOfElements", &G4NistManager::GetNumberOfElements)
119 .def(
"GetZ", &G4NistManager::GetZ)
120 .def(
"GetIsotopeMass", &G4NistManager::GetIsotopeMass)
121 .def(
"PrintElement", f1_PrintElement)
122 .def(
"PrintElement", f2_PrintElement)
123 .def(
"PrintG4Element", &G4NistManager::PrintG4Element)
125 #if G4VERSION_NUMBER < 910 126 .def(
"RegisterMaterial", &G4NistManager::RegisterMaterial)
127 .def(
"DeRegisterMaterial", &G4NistManager::DeRegisterMaterial)
129 .def(
"GetMaterial", &G4NistManager::GetMaterial,
130 return_value_policy<reference_existing_object>())
131 .def(
"FindOrBuildMaterial", &G4NistManager::FindOrBuildMaterial,
132 f_FindOrBuildMaterial()
133 [return_value_policy<reference_existing_object>()])
134 .def(
"ConstructNewMaterial", f1_ConstructNewMaterial,
135 f_ConstructNewMaterial()
136 [return_value_policy<reference_existing_object>()])
137 .def(
"ConstructNewMaterial", f2_ConstructNewMaterial,
138 f_ConstructNewMaterial()
139 [return_value_policy<reference_existing_object>()])
140 #if G4VERSION_NUMBER >= 910 141 .def(
"ConstructNewGasMaterial", &G4NistManager::ConstructNewGasMaterial,
142 f_ConstructNewGasMaterial()
143 [return_value_policy<reference_existing_object>()])
145 .def(
"GetNumberOfMaterials", &G4NistManager::GetNumberOfMaterials)
146 .def(
"ListMaterials", &G4NistManager::ListMaterials)
147 .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()