]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA/jetset/luerrm.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / PYTHIA / jetset / luerrm.F
1  
2 C********************************************************************* 
3  
4       SUBROUTINE LUERRM(MERR,CHMESS) 
5  
6 C...Purpose: to inform user of errors in program execution. 
7       COMMON/LUJETS/N,K(4000,5),P(4000,5),V(4000,5) 
8       COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200) 
9       SAVE /LUJETS/,/LUDAT1/ 
10       CHARACTER CHMESS*(*) 
11  
12 C...Write first few warnings, then be silent. 
13       IF(MERR.LE.10) THEN 
14         MSTU(27)=MSTU(27)+1 
15         MSTU(28)=MERR 
16         IF(MSTU(25).EQ.1.AND.MSTU(27).LE.MSTU(26)) WRITE(MSTU(11),5000) 
17      &  MERR,MSTU(31),CHMESS 
18  
19 C...Write first few errors, then be silent or stop program. 
20       ELSEIF(MERR.LE.20) THEN 
21         MSTU(23)=MSTU(23)+1 
22         MSTU(24)=MERR-10 
23         IF(MSTU(21).GE.1.AND.MSTU(23).LE.MSTU(22)) WRITE(MSTU(11),5100) 
24      &  MERR-10,MSTU(31),CHMESS 
25         IF(MSTU(21).GE.2.AND.MSTU(23).GT.MSTU(22)) THEN 
26           WRITE(MSTU(11),5100) MERR-10,MSTU(31),CHMESS 
27           WRITE(MSTU(11),5200) 
28           IF(MERR.NE.17) CALL LULIST(2) 
29           STOP 
30         ENDIF 
31  
32 C...Stop program in case of irreparable error. 
33       ELSE 
34         WRITE(MSTU(11),5300) MERR-20,MSTU(31),CHMESS 
35         STOP 
36       ENDIF 
37  
38 C...Formats for output. 
39  5000 FORMAT(/5X,'Advisory warning type',I2,' given after',I6, 
40      &' LUEXEC calls:'/5X,A) 
41  5100 FORMAT(/5X,'Error type',I2,' has occured after',I6, 
42      &' LUEXEC calls:'/5X,A) 
43  5200 FORMAT(5X,'Execution will be stopped after listing of last ', 
44      &'event!') 
45  5300 FORMAT(/5X,'Fatal error type',I2,' has occured after',I6, 
46      &' LUEXEC calls:'/5X,A/5X,'Execution will now be stopped!') 
47  
48       RETURN 
49       END