]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA/jetset/rluget.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / PYTHIA / jetset / rluget.F
diff --git a/PYTHIA/jetset/rluget.F b/PYTHIA/jetset/rluget.F
new file mode 100644 (file)
index 0000000..d09695f
--- /dev/null
@@ -0,0 +1,33 @@
+C********************************************************************* 
+      SUBROUTINE RLUGET(LFN,MOVE) 
+C...Purpose: to dump the state of the random number generator on a file 
+C...for subsequent startup from this state onwards. 
+      COMMON/LUDATR/MRLU(6),RRLU(100) 
+      SAVE /LUDATR/ 
+      CHARACTER CHERR*8 
+C...Backspace required number of records (or as many as there are). 
+      IF(MOVE.LT.0) THEN 
+        NBCK=MIN(MRLU(6),-MOVE) 
+        DO 100 IBCK=1,NBCK 
+        BACKSPACE(LFN,ERR=110,IOSTAT=IERR) 
+  100   CONTINUE 
+        MRLU(6)=MRLU(6)-NBCK 
+      ENDIF 
+C...Unformatted write on unit LFN. 
+      WRITE(LFN,ERR=110,IOSTAT=IERR) (MRLU(I1),I1=1,5), 
+     &(RRLU(I2),I2=1,100) 
+      MRLU(6)=MRLU(6)+1 
+      RETURN 
+C...Write error. 
+  110 WRITE(CHERR,'(I8)') IERR 
+      CALL LUERRM(18,'(RLUGET:) error when accessing file, IOSTAT ='// 
+     &CHERR) 
+      RETURN 
+      END