Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdhead.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:23 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.26 by S.Giani
11*-- Author :
12 SUBROUTINE GDHEAD(ISEL,NAME,CHRSIZ)
13C.
14C. ******************************************************************
15C. * *
16C. * This routine draws a graphics header. *
17C. * NAME is an hollerith string terminated by a dollar sign. *
18C. * *
19C. * Different options can be chosen by the parameter ISEL : *
20C. * =0 to have only the header lines *
21C. * =xxxxx1 to add the text NAME centered on top of header *
22C. * =xxxx1x to add global detector name (first vol.) on left *
23C. * =xxx1xx to add date on right *
24C. * =xx1xxx to select thick characters for NAME (i.e. with *
25C. * larger line width) *
26C. * =x1xxxx to add the text 'Event NR x' on top of header *
27C. * =1xxxxx to add the text 'Run NR x' on top of header *
28C. * *
29C. * A negative value of ISEL means special headers, i.e. *
30C. * directly used by GEANT3 routines : *
31C. * =-1 : GDSPEC header *
32C. * =-3 : VIEWXY header *
33C. * =-4 : VIEWYZ header *
34C. * =-5 : VIEWXZ header *
35C. * *
36C. * ==>Called by : <USER>, <GXINT>, GDSPEC, GDTREE *
37C. * Author : P.Zanarini ********* *
38C. * *
39C. ******************************************************************
40C.
41#include "geant321/gcbank.inc"
42#include "geant321/gcflag.inc"
43#include "geant321/gcdraw.inc"
44#include "geant321/gctime.inc"
45C
46 DIMENSION UH(5),VH(5),UHH(2),VHH(2)
47 DIMENSION UH1(5),VH1(5),UHH1(2),VHH1(2)
48 CHARACTER*9 CHDATE
49 CHARACTER*4 CHTEXT
50 CHARACTER*(*) NAME
51C
52 SAVE UH1,VH1,UHH1,VHH1
53C
54 DATA UH1/0.1,0.1,19.9,19.9,0.1/
55 DATA VH1/19.9,0.1,0.1,19.9,19.9/
56 DATA UHH1/0.1,19.9/
57 DATA VHH1/18.5,18.5/
58C.
59C. ------------------------------------------------------------------
60C.
61C Normalize to PLTRNX,PLTRNY
62C
63 DO 10 I=1,5
64 UH(I)=UH1(I)*PLTRNX/20.
65 VH(I)=VH1(I)*PLTRNY/20.
66 10 CONTINUE
67 DO 20 I=1,2
68 UHH(I)=UHH1(I)*PLTRNX/20.
69 VHH(I)=VHH1(I)*PLTRNY/20.
70 20 CONTINUE
71C
72 IF (ISEL.GE.0) THEN
73 ISEL5=ISEL/100000
74 ISEL5=ISEL5-ISEL5/2*2
75 ISEL4=ISEL/10000
76 ISEL4=ISEL4-ISEL4/2*2
77 ISEL3=ISEL/1000
78 ISEL3=ISEL3-ISEL3/2*2
79 ISEL2=ISEL/100
80 ISEL2=ISEL2-ISEL2/2*2
81 ISEL1=ISEL/10
82 ISEL1=ISEL1-ISEL1/2*2
83 ISEL0=ISEL/1
84 ISEL0=ISEL0-ISEL0/2*2
85 ENDIF
86C
87 CALL GDCOL(1)
88 CALL GDLW(2)
89 CALL GDRAWV(UH,VH,5)
90 IF (ISEL.EQ.0) THEN
91 CALL GDLW(0)
92 GO TO 30
93 ENDIF
94 CALL GDRAWV(UHH,VHH,2)
95 CALL GDLW(0)
96 IF (ISEL.LT.0.OR.ISEL1.NE.0) THEN
97 CALL UHTOC(IQ(JVOLUM+1),4,CHTEXT,4)
98 XTEXT=1.*PLTRNX/20.
99 YTEXT=19.*PLTRNY/20.
100 CSIZE=0.3*MIN(PLTRNX,PLTRNY)/20.
101 CALL GDRAWT(XTEXT,YTEXT,CHTEXT,CSIZE,0.,1,-1)
102 ENDIF
103 IF (ISEL3.NE.0) THEN
104 LWDTH=2
105 ELSE
106 LWDTH=1
107 ENDIF
108 IF (ISEL0.NE.0) THEN
109 CALL GDCOL(4)
110 XTEXT=10.*PLTRNX/20.
111 YTEXT=19.*PLTRNY/20.
112 CSIZE=CHRSIZ*MIN(PLTRNX,PLTRNY)/20.
113 CALL GDRAWT(XTEXT,YTEXT,NAME,CSIZE,0.,LWDTH,0)
114 CALL GDCOL(1)
115 ENDIF
116 IF (ISEL.GT.0) THEN
117 IF (ISEL4.NE.0) THEN
118 XTEXT=7.*PLTRNX/20.
119 YTEXT=18.7*PLTRNY/20.
120 CSIZE=0.3*MIN(PLTRNX,PLTRNY)/20.
121 CALL GDRAWT(XTEXT,YTEXT,'EVENT',CSIZE,0.,LWDTH,-1)
122 XTEXT=9.*PLTRNX/20.
123 CALL GDRAWT(XTEXT,YTEXT,'NR',CSIZE,0.,LWDTH,-1)
124*
125 CHDATE=' '
126 WRITE (CHDATE,'(I6)') IDEVT
127 XTEXT=12.*PLTRNX/20.
128 YTEXT=18.7*PLTRNY/20.
129 CSIZE=0.3*MIN(PLTRNX,PLTRNY)/20.
130 CALL GDRAWT(XTEXT,YTEXT,CHDATE,CSIZE,0.,LWDTH,1)
131 ENDIF
132 IF (ISEL5.NE.0) THEN
133 XTEXT=7.*PLTRNX/20.
134 YTEXT=19.2*PLTRNY/20.
135 CSIZE=0.3*MIN(PLTRNX,PLTRNY)/20.
136 CALL GDRAWT(XTEXT,YTEXT,'RUN',CSIZE,0.,LWDTH,-1)
137 XTEXT=9.*PLTRNX/20.
138 CALL GDRAWT(XTEXT,YTEXT,'NR',CSIZE,0.,LWDTH,-1)
139*
140 CHDATE=' '
141 WRITE (CHDATE,'(I6)') IDRUN
142 XTEXT=12.*PLTRNX/20.
143 YTEXT=19.2*PLTRNY/20.
144 CSIZE=0.3*MIN(PLTRNX,PLTRNY)/20.
145 CALL GDRAWT(XTEXT,YTEXT,CHDATE,CSIZE,0.,LWDTH,1)
146 ENDIF
147 ELSE
148 IF (ISEL.EQ.-1) THEN
149 CALL GDCOL(4)
150 XTEXT=8.5*PLTRNX/20.
151 YTEXT=19.*PLTRNY/20.
152 CSIZE=0.6*MIN(PLTRNX,PLTRNY)/20.
153 CALL GDRAWT(XTEXT,YTEXT,NAME,CSIZE,0.,2,1)
154 CALL GDCOL(1)
155 XTEXT=9.*PLTRNX/20.
156 YTEXT=19.*PLTRNY/20.
157 CSIZE=0.4*MIN(PLTRNX,PLTRNY)/20.
158 CALL GDRAWT(XTEXT,YTEXT,'<SPECIFICATIONS',CSIZE,0.,1,-1)
159 ELSE IF (ISEL.EQ.-3) THEN
160 CALL GDCOL(4)
161 XTEXT=10.*PLTRNX/20.
162 YTEXT=19.*PLTRNY/20.
163 CSIZE=0.5*MIN(PLTRNX,PLTRNY)/20.
164 CALL GDRAWT(XTEXT,YTEXT, 'C<ROSS - >S<ECTION> (<Z >=< >0)',
165 + CSIZE,0.,2,0)
166 CALL GDCOL(1)
167 ELSE IF (ISEL.EQ.-4) THEN
168 CALL GDCOL(4)
169 XTEXT=10.*PLTRNX/20.
170 YTEXT=19.*PLTRNY/20.
171 CSIZE=0.5*MIN(PLTRNX,PLTRNY)/20.
172 CALL GDRAWT(XTEXT,YTEXT,
173 + 'V<ERTICAL> S<ECTION> (<X >=< >0.5)',CSIZE,0.,2,0)
174 CALL GDCOL(1)
175 ELSE IF (ISEL.EQ.-5) THEN
176 CALL GDCOL(4)
177 XTEXT=10.*PLTRNX/20.
178 YTEXT=19.*PLTRNY/20.
179 CSIZE=0.5*MIN(PLTRNX,PLTRNY)/20.
180 CALL GDRAWT(XTEXT,YTEXT,
181 + 'H<ORIZONTAL> S<ECTION> (<Y >=< >5)',CSIZE,0.,2,0)
182 CALL GDCOL(1)
183 ENDIF
184 ENDIF
185 IF (ISEL.LT.0.OR.ISEL2.NE.0) THEN
186 IYEAR = (IGDATE)/10000
187 IMONTH = (IGDATE-IYEAR*10000)/100
188 IDAY = (IGDATE-IYEAR*10000-IMONTH*100)
189 CHDATE=' '
190 WRITE (CHDATE,'(I2,''/'',I2,''/'',I2)') IDAY,IMONTH,IYEAR
191 XTEXT=19.*PLTRNX/20.
192 YTEXT=19.*PLTRNY/20.
193 CSIZE=0.25*MIN(PLTRNX,PLTRNY)/20.
194 CALL GDRAWT(XTEXT,YTEXT,CHDATE,CSIZE,0.,1,1)
195 ENDIF
196 30 CALL GDCOL(0)
197 END