]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HIJING/hipyset1_35/rluset_hijing.F
Updated VZERO source
[u/mrichter/AliRoot.git] / HIJING / hipyset1_35 / rluset_hijing.F
CommitLineData
e74335a4 1* $Id$
2
3C*********************************************************************
4
5 SUBROUTINE RLUSET_HIJING(LFN,MOVE)
6
7C...Purpose: to read a state of the random number generator from a file
8C...for subsequent generation from this state onwards.
9#include "ludatr_hijing.inc"
10 CHARACTER CHERR*8
11
12C...Backspace required number of records (or as many as there are).
13 IF(MOVE.LT.0) THEN
14 NBCK=MIN(MRLU(6),-MOVE)
15 DO 100 IBCK=1,NBCK
16 100 BACKSPACE(LFN,ERR=120,IOSTAT=IERR)
17 MRLU(6)=MRLU(6)-NBCK
18 ENDIF
19
20C...Unformatted read from unit LFN.
21 NFOR=1+MAX(0,MOVE)
22 DO 110 IFOR=1,NFOR
23 110 READ(LFN,ERR=120,IOSTAT=IERR) (MRLU(I1),I1=1,5),
24 &(RRLU(I2),I2=1,100)
25 MRLU(6)=MRLU(6)+NFOR
26 RETURN
27
28C...Write error.
29 120 WRITE(CHERR,'(I8)') IERR
30 CALL LUERRM_HIJING(18
31 $ ,'(RLUSET_HIJING:) error when accessing file, IOSTAT ='/
32 $ /CHERR)
33
34 RETURN
35 END