Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# - build library
|
||||
|
||||
link_directories (${GEANT4_LIBRARY_DIR})
|
||||
|
||||
# library
|
||||
set(_TARGET pyG4intercoms)
|
||||
add_library(
|
||||
${_TARGET} SHARED
|
||||
pyG4UIcommand.cc
|
||||
pyG4UIcommandTree.cc
|
||||
pyG4UImanager.cc
|
||||
pyG4UIparameter.cc
|
||||
pymodG4intercoms.cc
|
||||
)
|
||||
|
||||
set_target_properties(${_TARGET} PROPERTIES PREFIX "")
|
||||
set_target_properties(${_TARGET} PROPERTIES OUTPUT_NAME "G4intercoms")
|
||||
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,5 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
# $Name: not supported by cvs2svn $
|
||||
# $Id: GNUmakefile 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIcommand.cc,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// $Id: pyG4UIcommand.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4UIcommand.cc
|
||||
//
|
||||
@@ -47,16 +46,16 @@ list f_GetStateList(G4UIcommand* acommand)
|
||||
list pyStateList;
|
||||
std::vector<G4ApplicationState>* stateList= acommand->GetStateList();
|
||||
|
||||
for(G4int i=0; i< stateList->size(); i++) {
|
||||
for( size_t i=0; i< stateList->size(); i++) {
|
||||
pyStateList.append(&(*stateList)[i]);
|
||||
}
|
||||
|
||||
return pyStateList;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
using namespace pyG4UIcommand;
|
||||
using namespace pyG4UIcommand;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
@@ -86,4 +85,3 @@ void export_G4UIcommand()
|
||||
.def("GetTitle", &G4UIcommand::GetTitle)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIcommandTree.cc,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// $Id: pyG4UIcommandTree.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4UIcommandTree.cc
|
||||
//
|
||||
@@ -41,12 +40,12 @@ using namespace boost::python;
|
||||
namespace pyG4UIcommandTree {
|
||||
|
||||
// GetTree
|
||||
G4UIcommandTree*(G4UIcommandTree::*f1_GetTree)(G4int)=
|
||||
G4UIcommandTree*(G4UIcommandTree::*f1_GetTree)(G4int)=
|
||||
&G4UIcommandTree::GetTree;
|
||||
G4UIcommandTree*(G4UIcommandTree::*f2_GetTree)(const char*)=
|
||||
G4UIcommandTree*(G4UIcommandTree::*f2_GetTree)(const char*)=
|
||||
&G4UIcommandTree::GetTree;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
using namespace pyG4UIcommandTree;
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UImanager.cc,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// $Id: pyG4UImanager.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4UImanager.cc
|
||||
//
|
||||
@@ -46,11 +45,11 @@ namespace pyG4UImanager {
|
||||
|
||||
// ApplyCommand
|
||||
G4int(G4UImanager::*f1_ApplyCommand)(const char*) = &G4UImanager::ApplyCommand;
|
||||
G4int(G4UImanager::*f2_ApplyCommand)(const G4String&) =
|
||||
G4int(G4UImanager::*f2_ApplyCommand)(const G4String&) =
|
||||
&G4UImanager::ApplyCommand;
|
||||
|
||||
// CreateHTML
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateHTML, CreateHTML, 0, 1);
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateHTML, CreateHTML, 0, 1)
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -63,7 +62,7 @@ G4int ApplyUICommand_1(const G4String& cmdstr)
|
||||
|
||||
G4int paramIndex= returnVal % 100;
|
||||
G4int commandStatus= returnVal - paramIndex;
|
||||
|
||||
|
||||
switch(commandStatus) {
|
||||
case fCommandSucceeded:
|
||||
break;
|
||||
@@ -74,7 +73,7 @@ G4int ApplyUICommand_1(const G4String& cmdstr)
|
||||
break;
|
||||
|
||||
case fIllegalApplicationState:
|
||||
G4cout << "illegal application state -- command refused"
|
||||
G4cout << "illegal application state -- command refused"
|
||||
<< G4endl;
|
||||
break;
|
||||
|
||||
@@ -88,7 +87,7 @@ G4int ApplyUICommand_1(const G4String& cmdstr)
|
||||
break;
|
||||
|
||||
case fParameterUnreadable:
|
||||
G4cout << "Parameter is wrong type and/or is not omittable (index "
|
||||
G4cout << "Parameter is wrong type and/or is not omittable (index "
|
||||
<< paramIndex << ")" << G4endl;
|
||||
break;
|
||||
|
||||
@@ -110,7 +109,7 @@ G4int ApplyUICommand_2(const std::string& cmdstr)
|
||||
return ApplyUICommand_1(cmdstr);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
using namespace pyG4UImanager;
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIparameter.cc,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// $Id: pyG4UIparameter.cc 66892 2013-01-17 10:57:59Z gunter $
|
||||
// ====================================================================
|
||||
// pyG4UIparameter.cc
|
||||
//
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4intercoms.cc,v 1.1 2006-08-08 05:20:57 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// $Id: pymodG4intercoms.cc 66892 2013-01-17 10:57:59Z gunter $
|
||||
// ====================================================================
|
||||
// pymodG4intercoms.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user