| Line | |
|---|
| 1 | # $Id: rndmSeed.mac,v 1.2 2007/06/13 10:36:39 maire Exp $
|
|---|
| 2 | #
|
|---|
| 3 | # This macro illustrates how to save and reset the random number seed
|
|---|
| 4 | #
|
|---|
| 5 | # inform the RunManager to systematically save the seed
|
|---|
| 6 | #
|
|---|
| 7 | /random/setSavingFlag 1
|
|---|
| 8 | #
|
|---|
| 9 | # run 0
|
|---|
| 10 | #
|
|---|
| 11 | /run/beamOn 7
|
|---|
| 12 | #look at what is saved
|
|---|
| 13 | /control/shell ls
|
|---|
| 14 | #
|
|---|
| 15 | # run 1
|
|---|
| 16 | #
|
|---|
| 17 | /run/beamOn
|
|---|
| 18 | #save the seed of this current run
|
|---|
| 19 | /random/saveThisRun
|
|---|
| 20 | /control/shell ls
|
|---|
| 21 | #
|
|---|
| 22 | # run 2
|
|---|
| 23 | #
|
|---|
| 24 | /run/beamOn 4
|
|---|
| 25 | #
|
|---|
| 26 | # run3 : restart run 2
|
|---|
| 27 | #
|
|---|
| 28 | /random/resetEngineFrom currentRun.rndm
|
|---|
| 29 | /run/beamOn 4
|
|---|
| 30 | #
|
|---|
| 31 | # run4 : restart run 1
|
|---|
| 32 | #
|
|---|
| 33 | /random/resetEngineFrom run1.rndm
|
|---|
| 34 | /run/beamOn
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.