Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -18,7 +18,7 @@ set_target_properties(${_TARGET}
|
||||
|
||||
|
||||
target_link_libraries (${_TARGET}
|
||||
${GEANT4_LIBRARIES_WITH_VIS} boost_python
|
||||
${GEANT4_LIBRARIES_WITH_VIS} ${BOOST_PYTHON_LIB}
|
||||
${PYTHON_LIBRARIES})
|
||||
|
||||
# install
|
||||
|
||||
@@ -23,7 +23,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
|
||||
|
||||
@@ -24,7 +24,7 @@ set_target_properties(${_TARGET}
|
||||
|
||||
target_link_libraries (${_TARGET}
|
||||
${GEANT4_LIBRARIES_WITH_VIS} ${XERCESC_LIBRARY}
|
||||
boost_python ${PYTHON_LIBRARIES})
|
||||
${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES})
|
||||
|
||||
# install
|
||||
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
|
||||
@@ -56,7 +56,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
|
||||
|
||||
@@ -61,33 +61,29 @@ void export_G4VPhysicalVolume()
|
||||
// ---
|
||||
.def("SetTranslation", &G4VPhysicalVolume::SetTranslation)
|
||||
.def("GetTranslation", &G4VPhysicalVolume::GetTranslation,
|
||||
return_internal_reference<>())
|
||||
return_value_policy<return_by_value>())
|
||||
.def("GetObjectTranslation", &G4VPhysicalVolume::GetObjectTranslation)
|
||||
.def("GetFrameTranslation", &G4VPhysicalVolume::GetObjectTranslation)
|
||||
// ---
|
||||
.def("SetRotation", &G4VPhysicalVolume::SetRotation)
|
||||
.def("GetRotation", f1_GetRotation,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
.def("GetRotation", f2_GetRotation,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
.def("GetObjectRotationValue", &G4VPhysicalVolume::GetObjectRotationValue)
|
||||
.def("GetFrameRotation", &G4VPhysicalVolume::GetFrameRotation,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
// ---
|
||||
.def("SetLogicalVolume", &G4VPhysicalVolume::SetLogicalVolume)
|
||||
.def("SetMotherLogical", &G4VPhysicalVolume::SetMotherLogical)
|
||||
.def("GetLogicalVolume", &G4VPhysicalVolume::GetLogicalVolume,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
.def("GetMotherLogical", &G4VPhysicalVolume::GetMotherLogical,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
// ---
|
||||
.def("SetName", &G4VPhysicalVolume::SetName)
|
||||
#if G4VERSION_NUMBER <= 801
|
||||
.def("GetName", &G4VPhysicalVolume::GetName)
|
||||
#else
|
||||
.def("GetName", &G4VPhysicalVolume::GetName,
|
||||
return_value_policy<return_by_value>())
|
||||
#endif
|
||||
.def("SetCopyNo", &G4VPhysicalVolume::SetCopyNo)
|
||||
.def("GetCopyNo", &G4VPhysicalVolume::GetCopyNo)
|
||||
// ---
|
||||
@@ -96,7 +92,6 @@ void export_G4VPhysicalVolume()
|
||||
.def("IsParameterised", &G4VPhysicalVolume::IsParameterised)
|
||||
.def("GetMultiplicity", &G4VPhysicalVolume::GetMultiplicity)
|
||||
.def("GetParameterisation", &G4VPhysicalVolume::GetParameterisation,
|
||||
return_value_policy<reference_existing_object>())
|
||||
return_value_policy<reference_existing_object>())
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,8 @@ 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
|
||||
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
|
||||
|
||||
@@ -18,7 +18,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
|
||||
|
||||
@@ -20,7 +20,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
|
||||
|
||||
@@ -17,7 +17,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
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,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
|
||||
|
||||
@@ -17,7 +17,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
|
||||
|
||||
@@ -25,7 +25,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
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# This package contains a set of Python interface with Geant4.
|
||||
# ==================================================================
|
||||
"""
|
||||
__version__ ='10.5'
|
||||
__date__ = 'December/2018'
|
||||
__version__ ='10.6'
|
||||
__date__ = 'December/2019'
|
||||
__author__ = 'K.Murakami (Koichi.Murakami@kek.jp)'
|
||||
|
||||
# import submodules
|
||||
|
||||
@@ -5,8 +5,8 @@ file (GLOB PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
|
||||
foreach (_pyfile ${PY_FILES})
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${_pyfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${_pyfile} COPYONLY)
|
||||
list (APPEND PYC_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}c")
|
||||
list (APPEND PYO_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}o")
|
||||
#list (APPEND PYC_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}c")
|
||||
#list (APPEND PYO_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}o")
|
||||
endforeach()
|
||||
|
||||
add_custom_target (Geant4Py ALL)
|
||||
@@ -20,7 +20,8 @@ add_custom_command (
|
||||
)
|
||||
|
||||
# install
|
||||
|
||||
install (FILES ${PY_FILES} DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
install (FILES ${PYC_FILES} DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
install (FILES ${PYO_FILES} DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__pycache__
|
||||
DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
#install (FILES ${PYC_FILES} DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
#install (FILES ${PYO_FILES} DESTINATION ${G4MODULES_INSTALL_DIR})
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# This package contains a set of Python interface with Geant4.
|
||||
# ==================================================================
|
||||
"""
|
||||
__version__ ='10.5'
|
||||
__date__ = 'December/2018'
|
||||
__version__ ='10.6'
|
||||
__date__ = 'December/2019'
|
||||
__author__ = 'K.Murakami (Koichi.Murakami@kek.jp)'
|
||||
|
||||
# import submodules
|
||||
@@ -85,9 +85,6 @@ gParticleIterator = PyG4ParticleList()
|
||||
# gProcessTable
|
||||
gProcessTable = G4ProcessTable.GetProcessTable()
|
||||
|
||||
# gLossTableManager
|
||||
gLossTableManager = G4LossTableManager.Instance()
|
||||
|
||||
# gProductionCutsTable
|
||||
gProductionCutsTable = G4ProductionCutsTable.GetProductionCutsTable()
|
||||
|
||||
|
||||
@@ -25,7 +25,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
|
||||
|
||||
@@ -21,7 +21,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
|
||||
|
||||
@@ -19,7 +19,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
|
||||
|
||||
@@ -42,7 +42,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
|
||||
|
||||
Reference in New Issue
Block a user