New PID class for EMCAL, bayesian analysis done with ESD data, PID information filled...
[u/mrichter/AliRoot.git] / PYTHIA6 / openDecayTable.F
1 #ifdef __APPLE__
2 #define stop CALL EXIT !
3 #define STOP CALL EXIT !
4 #endif
5       SUBROUTINE OPENDECAYTABLE(LUN)
6       LOGICAL OPENED,EXISTS
7       LOGICAL LRMSCH, LRD1O2, LTRASP
8       INTEGER LUN
9       CHARACTER*1000 FILNAM
10       CHARACTER*1000 CHROOT
11       CHROOT=' '
12       CALL GETENVF('ALICE_ROOT',CHROOT)
13       LNROOT = LNBLNK(CHROOT)
14       IF(LNROOT.LE.0) THEN
15          FILNAM='decaytable.dat'
16       ELSE
17          FILNAM=CHROOT(1:LNROOT)//'/data/decaytable.dat'
18       ENDIF
19       INQUIRE(FILE=FILNAM,EXIST=EXISTS)
20       IF(.NOT.EXISTS) THEN
21          PRINT*,'***********************************'
22          PRINT*,'*        OpenDecayTable           *'
23          PRINT*,'*        ---------------          *'
24          PRINT*,'*   File DECAYTABLE.DAT not found *'
25          PRINT*,'*         Program STOP            *'
26          PRINT*,'*   Check ALICE_ROOT environment  *'
27          PRINT*,'*           variable              *'
28          PRINT*,'***********************************'
29          STOP
30       ENDIF
31       OPEN(LUN,FILE=FILNAM,STATUS='OLD')
32       RETURN
33       END
34       SUBROUTINE CLOSEDECAYTABLE(LUN)
35       CLOSE(LUN)
36       RETURN
37       END