Geant4_10
test.py
Go to the documentation of this file.
1 #!/usr/bin/python3
2 # ==================================================================
3 # python script for Geant4Py test
4 #
5 # gtest04
6 # - test for command tree and command information
7 # ==================================================================
8 from Geant4 import *
9 
10 def DumpTree(atree):
11  print("@@", atree.GetPathName(), "::", atree.GetTitle())
12  ntree= atree.GetTreeEntry()
13  ncommand= atree.GetCommandEntry()
14 
15  for i in range(1, ncommand+1):
16  icommand= atree.GetCommand(i)
17  print(" **", icommand.GetCommandPath())
18  print(" ", icommand.GetTitle())
19  x= icommand.GetStateList()
20 
21  nparameter= icommand.GetParameterEntries()
22  for j in range(0, nparameter):
23  iparam= icommand.GetParameter(j)
24  print(" +", iparam.GetParameterName(), iparam.GetParameterType())
25 
26  for i in range(1, ntree+1):
27  itree= atree.GetTree(i)
28  DumpTree(itree)
29 
30 # ==================================================================
31 # main
32 # ==================================================================
33 root_tree= gUImanager.GetTree()
34 
35 DumpTree(root_tree)
36 
def DumpTree
Definition: test.py:10
const G4ParticleDefinition const G4Material *G4double range
void print(const std::vector< T > &data)
Definition: DicomRun.hh:111