Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-12 17:16:06 +01:00
parent 80e2389dd8
commit 84f33a068c
593 changed files with 68589 additions and 1 deletions
@@ -0,0 +1,3 @@
configure_file(test.py test.py)
add_test(NAME geant4py-test04 COMMAND ${PYTHON_EXECUTABLE} test.py)
set_tests_properties(geant4py-test04 PROPERTIES ENVIRONMENT "PYTHONPATH=${GEANT4_PYTHON_OUTPUT_DIR};${GEANT4_TEST_ENVIRONMENT}")
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env python
# ==================================================================
# python script for Geant4Py test
#
# gtest04
# - test for command tree and command information
# ==================================================================
from Geant4 import *
def DumpTree(atree):
print("@@", atree.GetPathName(), "::", atree.GetTitle())
ntree= atree.GetTreeEntry()
ncommand= atree.GetCommandEntry()
for i in range(1, ncommand+1):
icommand= atree.GetCommand(i)
print(" **", icommand.GetCommandPath())
print(" ", icommand.GetTitle())
x= icommand.GetStateList()
nparameter= icommand.GetParameterEntries()
for j in range(0, nparameter):
iparam= icommand.GetParameter(j)
print(" +", iparam.GetParameterName(), iparam.GetParameterType())
for i in range(1, ntree+1):
itree= atree.GetTree(i)
DumpTree(itree)
# ==================================================================
# main
# ==================================================================
root_tree= gUImanager.GetTree()
DumpTree(root_tree)