* EVGEN/AliGenEMCocktail.cxx (& .h) is the class that generates the cocktail follow...
[u/mrichter/AliRoot.git] / PYTHIA6 / openDecayTable.F
1 #ifdef __APPLE__
2 #ifndef __INTEL_COMPILER
3 #define stop CALL EXIT !
4 #define STOP CALL EXIT !
5 #endif
6 #endif
7       SUBROUTINE OPENDECAYTABLE(LUN)
8       LOGICAL OPENED,EXISTS
9       LOGICAL LRMSCH, LRD1O2, LTRASP
10       INTEGER LUN
11       CHARACTER*1000 FILNAM
12       CHARACTER*1000 CHROOT
13       CHROOT=' '
14       CALL GETENVF('ALICE_ROOT',CHROOT)
15       LNROOT = LNBLNK(CHROOT)
16       IF(LNROOT.LE.0) THEN
17          FILNAM='decaytable.dat'
18       ELSE
19          FILNAM=CHROOT(1:LNROOT)//'/data/decaytable.dat'
20       ENDIF
21       INQUIRE(FILE=FILNAM,EXIST=EXISTS)
22       IF(.NOT.EXISTS) THEN
23          PRINT*,'***********************************'
24          PRINT*,'*        OpenDecayTable           *'
25          PRINT*,'*        ---------------          *'
26          PRINT*,'*   File DECAYTABLE.DAT not found *'
27          PRINT*,'*         Program STOP            *'
28          PRINT*,'*   Check ALICE_ROOT environment  *'
29          PRINT*,'*           variable              *'
30          PRINT*,'***********************************'
31          STOP
32       ENDIF
33 #ifdef __GFORTRAN__
34       OPEN(LUN,FILE=FILNAM,STATUS='OLD',ACTION='READ')
35 #else
36       OPEN(LUN,FILE=FILNAM,STATUS='OLD')
37 #endif
38       RETURN
39       END
40       SUBROUTINE CLOSEDECAYTABLE(LUN)
41       CLOSE(LUN)
42       RETURN
43       END