EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rluget.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file rluget.f
1 
2 C*********************************************************************
3 
4  SUBROUTINE rluget(LFN,MOVE)
5 
6 C...Purpose: to dump the state of the random number generator on a file
7 C...for subsequent startup from this state onwards.
8  common/ludatr/mrlu(6),rrlu(100)
9  SAVE /ludatr/
10  CHARACTER cherr*8
11 
12 C...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=110,iostat=ierr)
17  mrlu(6)=mrlu(6)-nbck
18  ENDIF
19 
20 C...Unformatted write on unit LFN.
21  WRITE(lfn,err=110,iostat=ierr) (mrlu(i1),i1=1,5),
22  &(rrlu(i2),i2=1,100)
23  mrlu(6)=mrlu(6)+1
24  RETURN
25 
26 C...Write error.
27  110 WRITE(cherr,'(I8)') ierr
28  CALL luerrm(18,'(RLUGET:) error when accessing file, IOSTAT ='//
29  &cherr)
30 
31  RETURN
32  END