This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kernnum / n001fort / kerset.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1996/02/15 17:48:35 mclareni
6* Kernlib
7*
8*
9#include "kernnum/pilot.h"
10 SUBROUTINE KERSET(ERCODE,LGFILE,LIMITM,LIMITR)
11 PARAMETER(KOUNTE = 27)
12 CHARACTER*6 ERCODE, CODE(KOUNTE)
13 LOGICAL MFLAG, RFLAG
14 INTEGER KNTM(KOUNTE), KNTR(KOUNTE)
15 DATA LOGF / 0 /
16 DATA CODE(1), KNTM(1), KNTR(1) / 'C204.1', 255, 255 /
17 DATA CODE(2), KNTM(2), KNTR(2) / 'C204.2', 255, 255 /
18 DATA CODE(3), KNTM(3), KNTR(3) / 'C204.3', 255, 255 /
19 DATA CODE(4), KNTM(4), KNTR(4) / 'C205.1', 255, 255 /
20 DATA CODE(5), KNTM(5), KNTR(5) / 'C205.2', 255, 255 /
21 DATA CODE(6), KNTM(6), KNTR(6) / 'C305.1', 255, 255 /
22 DATA CODE(7), KNTM(7), KNTR(7) / 'C308.1', 255, 255 /
23 DATA CODE(8), KNTM(8), KNTR(8) / 'C312.1', 255, 255 /
24 DATA CODE(9), KNTM(9), KNTR(9) / 'C313.1', 255, 255 /
25 DATA CODE(10),KNTM(10),KNTR(10) / 'C336.1', 255, 255 /
26 DATA CODE(11),KNTM(11),KNTR(11) / 'C337.1', 255, 255 /
27 DATA CODE(12),KNTM(12),KNTR(12) / 'C341.1', 255, 255 /
28 DATA CODE(13),KNTM(13),KNTR(13) / 'D103.1', 255, 255 /
29 DATA CODE(14),KNTM(14),KNTR(14) / 'D106.1', 255, 255 /
30 DATA CODE(15),KNTM(15),KNTR(15) / 'D209.1', 255, 255 /
31 DATA CODE(16),KNTM(16),KNTR(16) / 'D509.1', 255, 255 /
32 DATA CODE(17),KNTM(17),KNTR(17) / 'E100.1', 255, 255 /
33 DATA CODE(18),KNTM(18),KNTR(18) / 'E104.1', 255, 255 /
34 DATA CODE(19),KNTM(19),KNTR(19) / 'E105.1', 255, 255 /
35 DATA CODE(20),KNTM(20),KNTR(20) / 'E208.1', 255, 255 /
36 DATA CODE(21),KNTM(21),KNTR(21) / 'E208.2', 255, 255 /
37 DATA CODE(22),KNTM(22),KNTR(22) / 'F010.1', 255, 0 /
38 DATA CODE(23),KNTM(23),KNTR(23) / 'F011.1', 255, 0 /
39 DATA CODE(24),KNTM(24),KNTR(24) / 'F012.1', 255, 0 /
40 DATA CODE(25),KNTM(25),KNTR(25) / 'F406.1', 255, 0 /
41 DATA CODE(26),KNTM(26),KNTR(26) / 'G100.1', 255, 255 /
42 DATA CODE(27),KNTM(27),KNTR(27) / 'G100.2', 255, 255 /
43 LOGF = LGFILE
44 L = 0
45 IF(ERCODE .NE. ' ') THEN
46 DO 10 L = 1, 6
47 IF(ERCODE(1:L) .EQ. ERCODE) GOTO 12
48 10 CONTINUE
49 12 CONTINUE
50 ENDIF
51 DO 14 I = 1, KOUNTE
52 IF(L .EQ. 0) GOTO 13
53 IF(CODE(I)(1:L) .NE. ERCODE(1:L)) GOTO 14
54 13 IF(LIMITM.GE.0) KNTM(I) = LIMITM
55 IF(LIMITR.GE.0) KNTR(I) = LIMITR
56 14 CONTINUE
57 RETURN
58 ENTRY KERMTR(ERCODE,LOG,MFLAG,RFLAG)
59 LOG = LOGF
60 DO 20 I = 1, KOUNTE
61 IF(ERCODE .EQ. CODE(I)) GOTO 21
62 20 CONTINUE
63 WRITE(*,1000) ERCODE
64 CALL ABEND
65 RETURN
66 21 RFLAG = KNTR(I) .GE. 1
67 IF(RFLAG .AND. (KNTR(I) .LT. 255)) KNTR(I) = KNTR(I) - 1
68 MFLAG = KNTM(I) .GE. 1
69 IF(MFLAG .AND. (KNTM(I) .LT. 255)) KNTM(I) = KNTM(I) - 1
70 IF(.NOT. RFLAG) THEN
71 IF(LOGF .LT. 1) THEN
72 WRITE(*,1001) CODE(I)
73 ELSE
74 WRITE(LOGF,1001) CODE(I)
75 ENDIF
76 ENDIF
77 IF(MFLAG .AND. RFLAG) THEN
78 IF(LOGF .LT. 1) THEN
79 WRITE(*,1002) CODE(I)
80 ELSE
81 WRITE(LOGF,1002) CODE(I)
82 ENDIF
83 ENDIF
84 RETURN
851000 FORMAT(' KERNLIB LIBRARY ERROR. ' /
86 + ' ERROR CODE ',A6,' NOT RECOGNIZED BY KERMTR',
87 + ' ERROR MONITOR. RUN ABORTED.')
881001 FORMAT(/' ***** RUN TERMINATED BY CERN LIBRARY ERROR ',
89 + 'CONDITION ',A6)
901002 FORMAT(/' ***** CERN LIBRARY ERROR CONDITION ',A6)
91 END