]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia6/openDecayTable.F
Partial Pythia to sync with master for missing files
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia6 / openDecayTable.F
diff --git a/PYTHIA6/AliPythia6/openDecayTable.F b/PYTHIA6/AliPythia6/openDecayTable.F
new file mode 100644 (file)
index 0000000..70003c0
--- /dev/null
@@ -0,0 +1,43 @@
+#ifdef __APPLE__
+#ifndef __INTEL_COMPILER
+#define stop CALL EXIT !
+#define STOP CALL EXIT !
+#endif
+#endif
+      SUBROUTINE OPENDECAYTABLE(LUN)
+      LOGICAL OPENED,EXISTS
+      LOGICAL LRMSCH, LRD1O2, LTRASP
+      INTEGER LUN
+      CHARACTER*1000 FILNAM
+      CHARACTER*1000 CHROOT
+      CHROOT=' '
+      CALL GETENVF('ALICE_ROOT',CHROOT)
+      LNROOT = LNBLNK(CHROOT)
+      IF(LNROOT.LE.0) THEN
+         FILNAM='decaytable.dat'
+      ELSE
+         FILNAM=CHROOT(1:LNROOT)//'/data/decaytable.dat'
+      ENDIF
+      INQUIRE(FILE=FILNAM,EXIST=EXISTS)
+      IF(.NOT.EXISTS) THEN
+         PRINT*,'***********************************'
+         PRINT*,'*        OpenDecayTable           *'
+         PRINT*,'*        ---------------          *'
+         PRINT*,'*   File DECAYTABLE.DAT not found *'
+         PRINT*,'*         Program STOP            *'
+         PRINT*,'*   Check ALICE_ROOT environment  *'
+         PRINT*,'*           variable              *'
+         PRINT*,'***********************************'
+         STOP
+      ENDIF
+#ifdef __GFORTRAN__
+      OPEN(LUN,FILE=FILNAM,STATUS='OLD',ACTION='READ')
+#else
+      OPEN(LUN,FILE=FILNAM,STATUS='OLD')
+#endif
+      RETURN
+      END
+      SUBROUTINE CLOSEDECAYTABLE(LUN)
+      CLOSE(LUN)
+      RETURN
+      END