32 #include <boost/python.hpp>
34 #if G4VERSION_NUMBER >= 710
37 using namespace boost::python;
42 namespace pyG4NistManager {
52 FindOrBuildElement, 1, 2)
62 FindOrBuildMaterial, 1, 2)
72 (
const G4String&,
const std::vector<G4String>&,
73 const std::vector<G4double>&, G4double, G4bool,
74 G4State, G4double, G4double)
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)
100 return_value_policy<reference_existing_object>())
101 .staticmethod(
"Instance")
106 #if G4VERSION_NUMBER < 910
107 .def(
"RegisterElement", &G4NistManager::RegisterElement)
108 .def(
"DeRegisterElement", &G4NistManager::DeRegisterElement)
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>()])
121 .def(
"PrintElement", f1_PrintElement)
122 .def(
"PrintElement", f2_PrintElement)
125 #if G4VERSION_NUMBER < 910
126 .def(
"RegisterMaterial", &G4NistManager::RegisterMaterial)
127 .def(
"DeRegisterMaterial", &G4NistManager::DeRegisterMaterial)
130 return_value_policy<reference_existing_object>())
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
142 f_ConstructNewGasMaterial()
143 [return_value_policy<reference_existing_object>()])
G4Material * GetMaterial(size_t index)
size_t GetNumberOfElements() const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
const G4ThreeVector const G4double const
static G4NistManager * Instance()
void PrintG4Material(const G4String &)
size_t GetNumberOfMaterials()
void PrintG4Element(const G4String &)
G4int GetZ(const G4String &symb) const
void ListMaterials(const G4String &)
G4Element * GetElement(size_t index)
void export_G4NistManager()
G4Material * ConstructNewGasMaterial(const G4String &name, const G4String &nameNist, G4double temp, G4double pres, G4bool isotopes=true)
G4double GetIsotopeMass(G4int Z, G4int N) const
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)