]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HIJING/hipyset1_35/rluget_hijing.F
Fix Coverity
[u/mrichter/AliRoot.git] / HIJING / hipyset1_35 / rluget_hijing.F
1 * $Id$
2     
3 C*********************************************************************  
4     
5       SUBROUTINE RLUGET_HIJING(LFN,MOVE)   
6     
7 C...Purpose: to dump the state of the random number generator on a file 
8 C...for subsequent startup from this state onwards. 
9 #include "ludatr_hijing.inc"
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_HIJING(18
29      $     ,'(RLUGET_HIJING:) error when accessing file, IOSTAT ='/
30      $     /CHERR)    
31     
32       RETURN    
33       END