]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/shaker/luerrm.f
80f9cd77461fcf62cba9264773c1a9b6be97c449
[u/mrichter/AliRoot.git] / PHOS / shaker / luerrm.f
1 *CMZ :          17/07/98  15.44.33  by  Federico Carminati
2 *-- Author :
3 C*********************************************************************
4
5       SUBROUTINE LUERRM(MERR,CHMESS)
6
7 C...Purpose: to inform user of errors in program execution.
8 *KEEP,LUJETS.
9       COMMON /LUJETS/ N,K(200000,5),P(200000,5),V(200000,5)
10       SAVE /LUJETS/
11 *KEEP,LUDAT1.
12       COMMON /LUDAT1/ MSTU(200),PARU(200),MSTJ(200),PARJ(200)
13       SAVE /LUDAT1/
14 *KEND.
15       CHARACTER CHMESS*(*)
16
17 C...Write first few warnings, then be silent.
18       IF(MERR.LE.10) THEN
19         MSTU(27)=MSTU(27)+1
20         MSTU(28)=MERR
21         IF(MSTU(25).EQ.1.AND.MSTU(27).LE.MSTU(26)) WRITE(MSTU(11),1000)
22      &  MERR,MSTU(31),CHMESS
23
24 C...Write first few errors, then be silent or stop program.
25       ELSEIF(MERR.LE.20) THEN
26         MSTU(23)=MSTU(23)+1
27         MSTU(24)=MERR-10
28         IF(MSTU(21).GE.1.AND.MSTU(23).LE.MSTU(22)) WRITE(MSTU(11),1100)
29      &  MERR-10,MSTU(31),CHMESS
30         IF(MSTU(21).GE.2.AND.MSTU(23).GT.MSTU(22)) THEN
31           WRITE(MSTU(11),1100) MERR-10,MSTU(31),CHMESS
32           WRITE(MSTU(11),1200)
33           IF(MERR.NE.17) CALL LULIST(2)
34           STOP
35         ENDIF
36
37 C...Stop program in case of irreparable error.
38       ELSE
39         WRITE(MSTU(11),1300) MERR-20,MSTU(31),CHMESS
40         STOP
41       ENDIF
42
43 C...Formats for output.
44  1000 FORMAT(/5X,'Advisory warning type',I2,' given after',I6,
45      &' LUEXEC calls:'/5X,A)
46  1100 FORMAT(/5X,'Error type',I2,' has occured after',I6,
47      &' LUEXEC calls:'/5X,A)
48  1200 FORMAT(5X,'Execution will be stopped after listing of last ',
49      &'event!')
50  1300 FORMAT(/5X,'Fatal error type',I2,' has occured after',I6,
51      &' LUEXEC calls:'/5X,A/5X,'Execution will now be stopped!')
52
53       RETURN
54       END