Opens decay table, needed to connect with C++.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2002 17:29:02 +0000 (17:29 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2002 17:29:02 +0000 (17:29 +0000)
PYTHIA6/openDecayTable.F [new file with mode: 0644]

diff --git a/PYTHIA6/openDecayTable.F b/PYTHIA6/openDecayTable.F
new file mode 100644 (file)
index 0000000..0e91f32
--- /dev/null
@@ -0,0 +1,58 @@
+      SUBROUTINE OPENDECAYTABLE(LUN)
+      LOGICAL OPENED,EXISTS
+      LOGICAL LRMSCH, LRD1O2, LTRASP
+      INTEGER LUN
+      CHARACTER*100 FILNAM
+#if defined(CERNLIB_LINUX)||defined(CERNLIB_UNIX)||defined(CERNLIB_VAX)||defined(CERNLIB_CRAY)
+      CHARACTER*100 CHROOT
+#endif
+#if defined(CERNLIB_LINUX) || defined(CERNLIB_UNIX)||defined(CERNLIB_CRAY)
+      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
+      OPEN(LUN,FILE=FILNAM,STATUS='OLD')
+#endif
+#if defined(CERNLIB_VAX)
+      ISTAT = LIB$SYS_TRNLOG ('ALICE_ROOT',NALL,CHROOT,,,%VAL(0))
+      IF(ISTAT.NE.1) THEN
+         FILNAM='decaytable.dat'
+      ELSE
+         FILNAM='ALICE_ROOT:[LIB]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
+      OPEN(LUN,FILE=FILNAM,STATUS='OLD',READONLY)
+#endif
+#if defined(CERNLIB_IBM)
+      FILNAM='/DECAYTABLE DAT *'
+      OPEN(LUN,FILE=FILNAM,STATUS='OLD')
+#endif
+      RETURN
+      END