Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -24,7 +24,7 @@ set_target_properties(${_TARGET}
BUILD_WITH_INSTALL_RPATH TRUE)
target_link_libraries (${_TARGET}
${GEANT4_LIBRARIES_WITH_VIS} boost_python
${GEANT4_LIBRARIES_WITH_VIS} ${BOOST_PYTHON_LIB}
${PYTHON_LIBRARIES})
# install
@@ -29,7 +29,6 @@
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4Material.hh"
using namespace boost::python;
@@ -45,6 +44,14 @@ void (G4Material::*f1_AddElement)(G4Element*, G4int)
void (G4Material::*f2_AddElement)(G4Element*, G4double)
= &G4Material::AddElement;
// GetMaterial
G4Material* (*f1_GetMaterial)(const G4String&, G4bool)
= &G4Material::GetMaterial;
G4Material* (*f2_GetMaterial)(G4double, G4double, G4double)
= &G4Material::GetMaterial;
G4Material* (*f3_GetMaterial)(size_t, G4double)
= &G4Material::GetMaterial;
BOOST_PYTHON_FUNCTION_OVERLOADS(f_GetMaterial, G4Material::GetMaterial, 1, 2)
// raw pointer -> Python list conversion
@@ -156,9 +163,12 @@ void export_G4Material()
.def("GetNumberOfMaterials", &G4Material::GetNumberOfMaterials)
.staticmethod("GetNumberOfMaterials")
.def("GetIndex", &G4Material::GetIndex)
.def("GetMaterial", &G4Material::GetMaterial,
f_GetMaterial()
[return_value_policy<reference_existing_object>()])
.def("GetMaterial", f1_GetMaterial, f_GetMaterial()
[return_value_policy<reference_existing_object>()])
.def("GetMaterial", f2_GetMaterial,
return_value_policy<reference_existing_object>())
.def("GetMaterial", f3_GetMaterial,
return_value_policy<reference_existing_object>())
.staticmethod("GetMaterial")
// ---
//.def(self_ns::str(self))
@@ -173,4 +183,3 @@ void export_G4Material()
.value("kStateGas", kStateGas)
;
}