Geant4_10
test3.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 # ==================================================================
3 # python script for Geant4Py test
4 #
5 # This script is just for test use. It will crash.
6 # ==================================================================
7 import test04, sys
8 
9 print "*** This script is just for test use. It will crash!"
10 
11 ctrack= test04.Track()
12 print "<<< ref#(ctrack)=", sys.getrefcount(ctrack)
13 cstep= ctrack.GetStep3()
14 print "<<< ref#(ctrack, cstep)=",\
15  sys.getrefcount(ctrack),\
16  sys.getrefcount(cstep)
17 del cstep
18 print "<<< delete cstep"
19 print "<<< ref#(ctrack)=", sys.getrefcount(ctrack)
20 
21 
22 print ""
23 cstep= ctrack.GetStep3()
24 cstep= test04.Step()
25 print "<<< previous step is still remain?"
26 
27 
28 print ""
29 print "--- stderr ---"
30 
31