5 * Revision 1.2 1997/01/24 14:16:06 mclareni
6 * NZLEFT 2nd argument 0 instead of blank for Msoft
8 * Revision 1.1.1.1.2.1 1997/01/21 11:24:20 mclareni
9 * All mods for Winnt 96a on winnt branch
11 * Revision 1.1.1.1 1995/10/24 10:20:23 cernlib
15 #include "geant321/pilot.h"
16 *CMZ : 3.21/02 29/03/94 15.41.26 by S.Giani
18 SUBROUTINE GDOPEN(IVIEW)
20 C. ******************************************************************
22 C. * Open view bank IVIEW for storing; if IVIEW=0 then *
23 C. * none view bank is opened and drawing is done *
26 C. * Q(JDRAW+IVIEW) contains a control word that is : *
28 C. * 1 for empty banks (created just to avoid gaps) *
29 C. * or for deleted banks *
31 C. * 2 for opened banks (all banks that have been opened) *
33 C. * 3 for protected banks (all banks that can't be deleted *
36 C. * ==>Called by : <USER>, <GXINT> *
37 C. * Authors : R.Brun, P.Zanarini ********* *
39 C. ******************************************************************
41 #include "geant321/gcbank.inc"
42 #include "geant321/gcflag.inc"
43 #include "geant321/gcdraw.inc"
44 #include "geant321/gcunit.inc"
45 COMMON/GCLOCA/NLOCAL(2),JLOCA(19),JV
47 C. ------------------------------------------------------------------
50 C Book JDRAW structure for view banks if not there
52 IF (JDRAW.LE.0) CALL MZBOOK(IXCONS,JDRAW,JDRAW,1,'DRAW',0,0,0,3,0)
54 C Previous view number must be 0 (screen)
56 IF (IDVIEW.NE.0) GO TO 60
58 C If want open a view bigger than current number of views
59 C then do a pushing of view banks
61 IF(IVIEW.LE.0)GO TO 999
62 IF (IVIEW.GT.NKVIEW) GO TO 20
64 C Cannot open a view already used
66 IF (LQ(JDRAW-IVIEW).NE.0) GO TO 40
68 IF (IDVIEW.EQ.0) GO TO 999
70 C Open view number IDVIEW
73 CALL MZBOOK(IXCONS,JV,JDRAW,-IDVIEW,'DRAW',6,6,22,3,0)
75 C Set number of words for creation and for pushing of banks
76 C graphic unit, graphic segment, text unit, text segment
79 NLEFT=NZLEFT(IXCONS,0)
102 C Set ICUT of the view bank to 0
106 C Graphic unit, graphic segment, text unit, text segment
107 C pointers are reset to zero
122 CALL MZBOOK(IXCONS,LBANK,JV,-1,'DRAW',0,0,ND1,3,0)
123 CALL MZBOOK(IXCONS,LBANK,JV,-2,'DRAW',0,0,ND2,3,0)
124 CALL MZBOOK(IXCONS,LBANK,JV,-3,'DRAW',0,0,ND3,3,0)
125 CALL MZBOOK(IXCONS,LBANK,JV,-4,'DRAW',0,0,ND4,3,0)
126 CALL MZBOOK(IXCONS,LBANK,JV,-5,'DRAW',0,0,ND5,3,0)
127 CALL MZBOOK(IXCONS,LBANK,JV,-6,'DRAW',0,0,ND6,3,0)
134 CALL MZPUSH(IXCONS,JDRAW,NDL,NDL,'I')
135 IF(IEOTRI.NE.0)GO TO 50
136 DO 30 I=NKVIEW+1,IDVIEW-1
142 40 WRITE (CHMAIL,1000)
146 50 WRITE (CHMAIL,1100)
150 60 WRITE (CHMAIL,1200)
153 1000 FORMAT (' ERROR IN GDOPEN: VIEW ALREADY EXISTING')
154 1100 FORMAT (' ERROR IN GDOPEN: MEMORY OVERFLOW IN PUSHING A BANK')
155 1200 FORMAT (' ERROR IN GDOPEN: ANOTHER VIEW IS ALREADY OPENED')