]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/ggeom/gsatt.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / ggeom / gsatt.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:55  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.30  by  S.Giani
11 *-- Author :
12       SUBROUTINE GSATT(NAME,IAT,IVAL)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *        Set attribute IAT to the value IVAL                     *
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  R.Brun  S.Giani *********                      *
33 C.    *                                                                *
34 C.    ******************************************************************
35 C.
36 #include "geant321/gcbank.inc"
37 #include "geant321/gcnum.inc"
38 #include "geant321/gcunit.inc"
39       COMMON/DEFPAR/IATDEF,IVADEF
40 *
41       CHARACTER*4 KATT(10),NAME,IAT,IATDEF
42       DIMENSION LATT(10)
43       SAVE KATT,IFIRST,LATT
44       DATA KATT/'WORK','SEEN','LSTY','LWID','COLO','FILL','SET ',
45      +'DET ','DTYP','NODE'/
46       DATA IFIRST/0/
47 C.
48 C.    ------------------------------------------------------------------
49 C.
50 C              CHECK IF OPTION EXISTS
51 *
52       IF(IAT.EQ.'DEFA')IAT=IATDEF
53       IF(IVAL.EQ.10000)IVAL=IVADEF
54 C
55       IF(IFIRST.EQ.0)THEN
56          IFIRST=1
57          CALL UCTOH(KATT,LATT,4,40)
58       ENDIF
59 C
60       IPN=5
61       IPS=7
62 C
63 C              CHECK IF OPTION EXISTS
64 C
65       CALL GLOOK(IAT,LATT,10,IOP)
66       IF(IOP.GT.0)GO TO 10
67       WRITE(CHMAIL,10100)IAT
68       CALL GMAIL(0,0)
69       GO TO 999
70 C              CHECK IF VOLUME EXISTS
71 C
72    10 IF(JVOLUM.GT.0)GO TO 20
73       WRITE(CHMAIL,10000)NAME
74       CALL GMAIL(0,0)
75       GO TO 999
76 C
77    20 IF(NAME(1:1).EQ.'*')GO TO 40
78       CALL GLOOK(NAME,IQ(JVOLUM+1),NVOLUM,IVOLU)
79       IF(IVOLU.GT.0)GO TO 30
80       WRITE(CHMAIL,10000)NAME
81       CALL GMAIL(0,0)
82       GO TO 999
83 C
84    30 JVO=LQ(JVOLUM-IVOLU)
85       NPAR=Q(JVO+IPN)
86       Q(JVO+NPAR+IPS-1+IOP)=IVAL
87       GO TO 999
88 C
89 C             SET OPTION VALUE FOR ALL DEFINED VOLUMES
90 C
91    40 CONTINUE
92       DO 50 I=1,NVOLUM
93          JVO=LQ(JVOLUM-I)
94          NPAR=Q(JVO+IPN)
95          Q(JVO+NPAR+IPS-1+IOP)=IVAL
96    50 CONTINUE
97 C
98 10000 FORMAT(' GSATT VOLUME ',A4,' DOES NOT EXIST ')
99 10100 FORMAT(' GSATT OPTION ',A4,' NOT IMPLEMENTED ')
100   999 END