source: Sophya/trunk/SophyaExt/CodeMinuit/code/mnwarn.F@ 3452

Last change on this file since 3452 was 2403, checked in by cmv, 22 years ago

Creation du module de code source de MINUIT (CERNLIB) extrait par CMV

cmv 11/06/2003

File size: 3.0 KB
Line 
1*
2* $Id: mnwarn.F,v 1.1.1.1 2003-06-11 14:18:30 cmv Exp $
3*
4* $Log: not supported by cvs2svn $
5* Revision 1.1.1.1 1996/03/07 14:31:32 mclareni
6* Minuit
7*
8*
9#include "minuit/pilot.h"
10 SUBROUTINE MNWARN(COPT,CORG,CMES)
11C If COPT='W', CMES is a WARning message from CORG.
12C If COPT='D', CMES is a DEBug message from CORG.
13C If SET WARnings is in effect (the default), this routine
14C prints the warning message CMES coming from CORG.
15C If SET NOWarnings is in effect, the warning message is
16C stored in a circular buffer of length MAXMES.
17C If called with CORG=CMES='SHO', it prints the messages in
18C the circular buffer, FIFO, and empties the buffer.
19#include "minuit/d506dp.inc"
20#include "minuit/d506cm.inc"
21 CHARACTER COPT*1, CORG*(*), CMES*(*), CTYP*7
22 PARAMETER (MAXMES=10)
23 CHARACTER ORIGIN(MAXMES,2)*10, WARMES(MAXMES,2)*60
24 COMMON/MN7WRC/ORIGIN, WARMES
25 COMMON/MN7WRI/NFCWAR(MAXMES,2),ICIRC(2)
26 CHARACTER ENGLSH*20
27C
28 IF (CORG(1:3).EQ.'SHO' .AND. CMES(1:3).EQ.'SHO') GO TO 200
29C Either print warning or put in buffer
30 IF (COPT .EQ. 'W') THEN
31 ITYP = 1
32 IF (LWARN) THEN
33 WRITE (ISYSWR,'(A,A/A,A)') ' MINUIT WARNING IN ',CORG,
34 + ' ============== ',CMES
35 RETURN
36 ENDIF
37 ELSE
38 ITYP = 2
39 IF (LREPOR) THEN
40 WRITE (ISYSWR,'(A,A/A,A)') ' MINUIT DEBUG FOR ',CORG,
41 + ' ============== ',CMES
42 RETURN
43 ENDIF
44 ENDIF
45C if appropriate flag is off, fill circular buffer
46 IF (NWRMES(ITYP) .EQ. 0) ICIRC(ITYP) = 0
47 NWRMES(ITYP) = NWRMES(ITYP) + 1
48 ICIRC(ITYP) = ICIRC(ITYP) + 1
49 IF (ICIRC(ITYP) .GT. MAXMES) ICIRC(ITYP) = 1
50 IC = ICIRC(ITYP)
51 ORIGIN(IC,ITYP) = CORG
52 WARMES(IC,ITYP) = CMES
53 NFCWAR(IC,ITYP) = NFCN
54 RETURN
55C
56C 'SHO WARnings', ask if any suppressed mess in buffer
57 200 CONTINUE
58 IF (COPT .EQ. 'W') THEN
59 ITYP = 1
60 CTYP = 'WARNING'
61 ELSE
62 ITYP = 2
63 CTYP = '*DEBUG*'
64 ENDIF
65 IF (NWRMES(ITYP) .GT. 0) THEN
66 ENGLSH = ' WAS SUPPRESSED. '
67 IF (NWRMES(ITYP) .GT. 1) ENGLSH = 'S WERE SUPPRESSED.'
68 WRITE (ISYSWR,'(/1X,I5,A,A,A,A/)') NWRMES(ITYP),
69 + ' MINUIT ',CTYP,' MESSAGE', ENGLSH
70 NM = NWRMES(ITYP)
71 IC = 0
72 IF (NM .GT. MAXMES) THEN
73 WRITE (ISYSWR,'(A,I2,A)') ' ONLY THE MOST RECENT ',
74 + MAXMES,' WILL BE LISTED BELOW.'
75 NM = MAXMES
76 IC = ICIRC(ITYP)
77 ENDIF
78 WRITE (ISYSWR,'(A)') ' CALLS ORIGIN MESSAGE'
79 DO 300 I= 1, NM
80 IC = IC + 1
81 IF (IC .GT. MAXMES) IC = 1
82 WRITE (ISYSWR,'(1X,I6,1X,A,1X,A)')
83 + NFCWAR(IC,ITYP),ORIGIN(IC,ITYP),WARMES(IC,ITYP)
84 300 CONTINUE
85 NWRMES(ITYP) = 0
86 WRITE (ISYSWR,'(1H )')
87 ENDIF
88 RETURN
89 END
Note: See TracBrowser for help on using the repository browser.