<http://savannah.cern.ch/bugs/?102190>
[u/mrichter/AliRoot.git] / PYTHIA6 / openDecayTable.F
CommitLineData
a646c34a 1#ifdef __APPLE__
0d3bfbca 2#ifndef __INTEL_COMPILER
a646c34a 3#define stop CALL EXIT !
4#define STOP CALL EXIT !
5#endif
0d3bfbca 6#endif
e2dc8e65 7 SUBROUTINE OPENDECAYTABLE(LUN)
8 LOGICAL OPENED,EXISTS
9 LOGICAL LRMSCH, LRD1O2, LTRASP
10 INTEGER LUN
a39be50e 11 CHARACTER*1000 FILNAM
12 CHARACTER*1000 CHROOT
e2dc8e65 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
b82f5858 33#ifdef __GFORTRAN__
45d36cf7 34 OPEN(LUN,FILE=FILNAM,STATUS='OLD',ACTION='READ')
b82f5858 35#else
36 OPEN(LUN,FILE=FILNAM,STATUS='OLD')
37#endif
e2dc8e65 38 RETURN
39 END
4b9d5593 40 SUBROUTINE CLOSEDECAYTABLE(LUN)
41 CLOSE(LUN)
42 RETURN
43 END