Last change
on this file since 1358 was
1337,
checked in by garnier, 14 years ago
|
tag geant4.9.4 beta 1 + modifs locales
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1337] | 1 | #!/usr/bin/python |
---|
| 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 | |
---|
Note: See
TracBrowser
for help on using the repository browser.