Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -0,0 +1,32 @@
# - build library
link_directories (${GEANT4_LIBRARY_DIR})
# library
set(_TARGET pyG4run)
add_library(
${_TARGET} SHARED
pyG4Run.cc
pyG4RunManager.cc
pyG4RunManagerKernel.cc
pyG4UserRunAction.cc
pyG4VModularPhysicsList.cc
pyG4VPhysicsConstructor.cc
pyG4VUserDetectorConstruction.cc
pyG4VUserPhysicsList.cc
pyG4VUserPrimaryGeneratorAction.cc
pymodG4run.cc
)
set_target_properties(${_TARGET} PROPERTIES PREFIX "")
set_target_properties(${_TARGET} PROPERTIES OUTPUT_NAME "G4run")
set_target_properties(${_TARGET}
PROPERTIES INSTALL_RPATH
${GEANT4_LIBRARY_DIR}
BUILD_WITH_INSTALL_RPATH TRUE)
target_link_libraries (${_TARGET}
${GEANT4_LIBRARIES_WITH_VIS} boost_python)
# install
install(TARGETS ${_TARGET} LIBRARY DESTINATION ${G4MODULES_INSTALL_DIR})
+1 -2
View File
@@ -1,5 +1,4 @@
# $Id: GNUmakefile,v 1.2 2006-04-25 08:09:45 kmura Exp $
# $Name: not supported by cvs2svn $
# $Id: GNUmakefile 76884 2013-11-18 12:54:03Z gcosmo $
# ===========================================================
# Makefile for building Geant4Py modules
# ===========================================================
+1 -2
View File
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Run.cc,v 1.4 2006-06-29 15:35:09 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4Run.cc 66892 2013-01-17 10:57:59Z gunter $
// ====================================================================
// pyG4Run.cc
//
+8 -13
View File
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4RunManager.cc,v 1.6 2010-12-02 08:23:05 kmura Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4RunManager.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4RunManager.cc
//
@@ -73,29 +72,24 @@ void (G4RunManager::*f6_SetUserAction)(G4UserSteppingAction*)
= &G4RunManager::SetUserAction;
// DumpRegion
#if G4VERSION_NUMBER >= 932
void (G4RunManager::*f1_DumpRegion)(const G4String&) const
= &G4RunManager::DumpRegion;
#else
void (G4RunManager::*f1_DumpRegion)(G4String) const
= &G4RunManager::DumpRegion;
#endif
void (G4RunManager::*f2_DumpRegion)(G4Region*) const
= &G4RunManager::DumpRegion;
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_DumpRegion, DumpRegion, 0, 1);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_DumpRegion, DumpRegion, 0, 1)
// BeamOn()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_BeamOn, BeamOn, 1, 3);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_BeamOn, BeamOn, 1, 3)
// AbortRun()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_AbortRun, AbortRun, 0, 1);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_AbortRun, AbortRun, 0, 1)
// DefineWorldVolume()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_DefineWorldVolume,
DefineWorldVolume, 1, 2);
DefineWorldVolume, 1, 2)
};
}
using namespace pyG4RunManager;
@@ -104,7 +98,8 @@ using namespace pyG4RunManager;
// ====================================================================
void export_G4RunManager()
{
class_<G4RunManager>("G4RunManager", "run manager class")
class_<G4RunManager, boost::noncopyable>
("G4RunManager", "run manager class")
// ---
.def("GetRunManager", &G4RunManager::GetRunManager,
"Get an instance of G4RunManager",
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4RunManagerKernel.cc,v 1.3 2006-06-29 15:35:15 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4RunManagerKernel.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4RunManagerKernel.cc
//
@@ -40,7 +39,7 @@ using namespace boost::python;
// ====================================================================
namespace pyG4RunManagerKernel {
};
}
using namespace pyG4RunManagerKernel;
@@ -63,9 +62,9 @@ void export_G4RunManagerKernel()
//.def("UpdateRegion", &G4RunManagerKernel::UpdateRegion)
//.def("DumpRegion", &G4RunManagerKernel::DumpRegion)
//.def("DumpRegion", &G4RunManagerKernel::DumpRegion)
//.def("GeometryHasBeenModified",
//.def("GeometryHasBeenModified",
//&G4RunManagerKernel::GeometryHasBeenModified)
//.def("PhysicsHasBeenModified",
//.def("PhysicsHasBeenModified",
//&G4RunManagerKernel::PhysicsHasBeenModified)
//.def("GetEventManager", &G4RunManagerKernel::GetEventManager,
//...)
@@ -78,7 +77,7 @@ void export_G4RunManagerKernel()
//...)
//.def("GetVersionString", &G4RunManagerKernel::GetVersionString)
//.def("SetVerboseLevel", &G4RunManagerKernel::SetVerboseLevel)
//.def("SetGeometryToBeOptimized",
//.def("SetGeometryToBeOptimized",
//&G4RunManagerKernel::SetGeometryToBeOptimized)
;
}
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4UserRunAction.cc,v 1.6 2006-06-29 15:35:18 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4UserRunAction.cc 66892 2013-01-17 10:57:59Z gunter $
// ====================================================================
// pyG4UserRunAction.cc
//
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VModularPhysicsList.cc,v 1.4 2008-05-22 09:27:25 kmura Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4VModularPhysicsList.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4VModularPhysicsList.cc
//
@@ -50,10 +49,10 @@ struct CB_G4VModularPhysicsList :
};
// GetPhysics()
const G4VPhysicsConstructor*
const G4VPhysicsConstructor*
(G4VModularPhysicsList::*f1_GetPhysics)(G4int) const
= &G4VModularPhysicsList::GetPhysics;
const G4VPhysicsConstructor*
const G4VPhysicsConstructor*
(G4VModularPhysicsList::*f2_GetPhysics)(const G4String&) const
= &G4VModularPhysicsList::GetPhysics;
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VPhysicsConstructor.cc,v 1.3 2006-06-29 15:35:24 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4VPhysicsConstructor.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4VPhysicsConstructor.cc
//
@@ -41,12 +40,12 @@ using namespace boost::python;
namespace pyG4VPhysicsConstructor {
class CB_G4VPhysicsConstructor :
public G4VPhysicsConstructor,
public G4VPhysicsConstructor,
public wrapper<G4VPhysicsConstructor> {
public:
CB_G4VPhysicsConstructor(): G4VPhysicsConstructor() { }
CB_G4VPhysicsConstructor(const G4String& name)
CB_G4VPhysicsConstructor(const G4String& name)
: G4VPhysicsConstructor(name) { }
void ConstructParticle() {
@@ -61,9 +60,9 @@ public:
// SetPhysicsName()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_SetPhysicsName,
SetPhysicsName, 0, 1);
SetPhysicsName, 0, 1)
};
}
using namespace pyG4VPhysicsConstructor;
@@ -76,8 +75,8 @@ void export_G4VPhysicsConstructor()
("G4VPhysicsConstructor",
"base class of user physics constructor")
// ----
.def(init<const G4String&>())
// ---
.def(init<const G4String&>())
// ---
.def("ConstructParticle",
pure_virtual(&G4VPhysicsConstructor::ConstructParticle))
.def("ConstructProcess",
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VUserDetectorConstruction.cc,v 1.6 2007-07-10 07:09:51 kmura Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4VUserDetectorConstruction.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4VUserDetectorConstruction.cc
//
@@ -49,7 +48,7 @@ struct CB_G4VUserDetectorConstruction :
}
};
};
}
using namespace pyG4VUserDetectorConstruction;
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VUserPhysicsList.cc,v 1.5 2006-06-29 15:35:30 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4VUserPhysicsList.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4VUserPhysicsList.cc
//
@@ -75,10 +74,10 @@ void (G4VUserPhysicsList::*f2_SetParticleCuts)(G4double,
// StorePhysicsTable
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_StorePhysicsTable,
StorePhysicsTable, 0, 1);
StorePhysicsTable, 0, 1)
// SetParticleCuts
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_SetParticleCuts,
SetParticleCuts, 2, 3);
SetParticleCuts, 2, 3)
}
@@ -104,10 +103,10 @@ void export_G4VUserPhysicsList()
// ---
.def("StorePhysicsTable", &G4VUserPhysicsList::StorePhysicsTable,
f_StorePhysicsTable())
.def("IsPhysicsTableRetrieved",
.def("IsPhysicsTableRetrieved",
&G4VUserPhysicsList::IsPhysicsTableRetrieved)
.def("IsStoredInAscii", &G4VUserPhysicsList::IsStoredInAscii)
.def("GetPhysicsTableDirectory",
.def("GetPhysicsTableDirectory",
&G4VUserPhysicsList::GetPhysicsTableDirectory,
return_value_policy<return_by_value>())
.def("SetStoredInAscii", &G4VUserPhysicsList::SetStoredInAscii)
@@ -116,7 +115,7 @@ void export_G4VUserPhysicsList()
.def("DumpList", &G4VUserPhysicsList::DumpList)
.def("DumpCutValuesTable", &G4VUserPhysicsList::DumpCutValuesTable)
.def("DumpCutValuesTableIfRequested",
.def("DumpCutValuesTableIfRequested",
&G4VUserPhysicsList::DumpCutValuesTableIfRequested)
.def("SetCutValue", f1_SetCutValue)
.def("SetCutValue", f2_SetCutValue)
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VUserPrimaryGeneratorAction.cc,v 1.7 2006-06-29 15:35:33 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pyG4VUserPrimaryGeneratorAction.cc 76884 2013-11-18 12:54:03Z gcosmo $
// ====================================================================
// pyG4VUserPrimaryGeneratorAction.cc
//
@@ -43,13 +42,13 @@ namespace pyG4VUserPrimaryGeneratorAction {
struct CB_G4VUserPrimaryGeneratorAction :
G4VUserPrimaryGeneratorAction, wrapper<G4VUserPrimaryGeneratorAction> {
void GeneratePrimaries(G4Event* anEvent) {
get_override("GeneratePrimaries")(boost::ref(anEvent));
}
};
};
}
using namespace pyG4VUserPrimaryGeneratorAction;
@@ -59,11 +58,11 @@ using namespace pyG4VUserPrimaryGeneratorAction;
void export_G4VUserPrimaryGeneratorAction()
{
class_<CB_G4VUserPrimaryGeneratorAction, CB_G4VUserPrimaryGeneratorAction*,
boost::noncopyable>
("G4VUserPrimaryGeneratorAction",
boost::noncopyable>
("G4VUserPrimaryGeneratorAction",
"base class of user primary generator action")
.def("GeneratePrimaries",
.def("GeneratePrimaries",
pure_virtual(&G4VUserPrimaryGeneratorAction::GeneratePrimaries))
;
}
+1 -2
View File
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pymodG4run.cc,v 1.4 2006-06-29 15:35:35 gunter Exp $
// $Name: not supported by cvs2svn $
// $Id: pymodG4run.cc 66892 2013-01-17 10:57:59Z gunter $
// ====================================================================
// pymodG4run.cc [Geant4Py module]
//