Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gfind.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:30  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.28  by  S.Giani
11 *-- Author :
12       SUBROUTINE GFIND(NAME,IAT,ISVALS)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *        For attribute IAT find value ISVALS                     *
17 C.    *        for the volume NAME                                     *
18 C.    *                                                                *
19 C.    *    1:  'WORK'   0=volume inactive   1=active volume            *
20 C.    *    2:  'SEEN'   0=unseen 1=seen -1,-2=tree unseen -3=tree opt. *
21 C.    *    3:  'LSTY'   line style 1,2,3,...                           *
22 C.    *    4:  'LWID'   line width 1,2,3,...                           *
23 C.    *    5:  'COLO'   color code 1,2,3,...                           *
24 C.    *    6:  'FILL'   fill area  0,1,2,...                           *
25 C.    *    7:  'SET '   set number associated to this volume           *
26 C.    *    8:  'DET '   detector number associated to this volume      *
27 C.    *    9:  'DTYP'   detector type (1,2)                            *
28 C.    *   10:  'NODE'   <>0=a node is created for 3D (PIONS,GMR,etc.)  *
29 C.    *                                                                *
30 C.    *    ==>Called by : <USER>, <GXINT>, GDPRTR,GDSPEC,GDTREE,GSDET, *
31 C.    *                   GSDETV,GSDVN,GSDVN2,GSDVT,GSDVT2,GSVOLU      *
32 C.    *          Author  S.Giani  *********                            *
33 C.    *                                                                *
34 C.    ******************************************************************
35 C.
36 #include "geant321/gcbank.inc"
37 #include "geant321/gcnum.inc"
38 #include "geant321/gcunit.inc"
39       CHARACTER*4 KATT(10),NAME,IAT
40       DIMENSION LATT(10)
41       SAVE KATT,IFIRST,LATT
42       DATA KATT/'WORK','SEEN','LSTY','LWID','COLO','FILL','SET ',
43      +'DET ','DTYP','NODE'/
44       DATA IFIRST/0/
45 C.
46 C.    ------------------------------------------------------------------
47 C.
48 C              CHECK IF OPTION EXISTS
49 C
50       IF(IFIRST.EQ.0)THEN
51          IFIRST=1
52          CALL UCTOH(KATT,LATT,4,40)
53       ENDIF
54 C
55       IPN=5
56       IPS=7
57 C
58 C              CHECK IF OPTION EXISTS
59 C
60       CALL GLOOK(IAT,LATT,10,IOP)
61       IF(IOP.GT.0)GO TO 10
62       WRITE(CHMAIL,2000)IAT
63       CALL GMAIL(0,0)
64       GO TO 99
65 C              CHECK IF VOLUME EXISTS
66 C
67   10  IF(JVOLUM.GT.0)GO TO 20
68       WRITE(CHMAIL,1000)NAME
69       CALL GMAIL(0,0)
70       GO TO 99
71 C
72   20  IF(NAME(1:1).EQ.'*')GO TO 40
73       CALL GLOOK(NAME,IQ(JVOLUM+1),NVOLUM,IVOLU)
74       IF(IVOLU.GT.0)GO TO 30
75       WRITE(CHMAIL,1000)NAME
76       CALL GMAIL(0,0)
77       GO TO 99
78 C
79   30  JVO=LQ(JVOLUM-IVOLU)
80       NPAR=Q(JVO+IPN)
81       ISVALS=Q(JVO+NPAR+IPS-1+IOP)
82       GO TO 99
83 C
84 C             SET OPTION VALUE FOR ALL DEFINED VOLUMES
85 C
86   40  CONTINUE
87 *      DO 50 I=1,NVOLUM
88       I=2
89       JVO=LQ(JVOLUM-I)
90       NPAR=Q(JVO+IPN)
91       ISVALS=Q(JVO+NPAR+IPS-1+IOP)
92 *  50  CONTINUE
93 C
94  1000 FORMAT(' GSATT VOLUME ',A4,' DOES NOT EXIST ')
95  2000 FORMAT(' GSATT OPTION ',A4,' NOT IMPLEMENTED ')
96   99  RETURN
97       END