Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test1.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 # ==================================================================
3 # python script for Geant4Py test
4 #
5 #
6 # ==================================================================
7 import test04, sys
8 
9 atrack= test04.Track()
10 print "<<< ref#(atrack)=", sys.getrefcount(atrack)
11 
12 
13 astep= atrack.GetStep1()
14 print "<<< ref#(atrack, astep)=",\
15  sys.getrefcount(atrack),\
16  sys.getrefcount(astep)
17 del astep
18 print "<<< delete astep"
19 print "<<< ref#(atrack)=", sys.getrefcount(atrack)
20 
21 print ""
22 bstep= atrack.GetStep1()
23 bstep= test04.Step()
24 print "<<< previous step is still remain?"
25 
26 print ""
27 print "--- stderr ---"
28