37 lines
590 B
Plaintext
37 lines
590 B
Plaintext
# $Id: rndmSeed.mac,v 1.2 2007-06-13 10:36:39 maire Exp $
|
|
#
|
|
# This macro illustrates how to save and reset the random number seed
|
|
#
|
|
# inform the RunManager to systematically save the seed
|
|
#
|
|
/random/setSavingFlag 1
|
|
#
|
|
/testem/event/printModulo 1
|
|
#
|
|
# run 0
|
|
#
|
|
/run/beamOn 7
|
|
#look at what is saved
|
|
/control/shell ls
|
|
#
|
|
# run 1
|
|
#
|
|
/run/beamOn
|
|
#save the seed of this current run
|
|
/random/saveThisRun
|
|
/control/shell ls
|
|
#
|
|
# run 2
|
|
#
|
|
/run/beamOn 4
|
|
#
|
|
# run3 : restart run 2
|
|
#
|
|
/random/resetEngineFrom currentRun.rndm
|
|
/run/beamOn 4
|
|
#
|
|
# run4 : restart run 1
|
|
#
|
|
/random/resetEngineFrom run1.rndm
|
|
/run/beamOn
|