]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:21:09 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/02 29/03/94 15.41.20 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE GFDET(IUSET,IUDET,NV,NAMESV,NBITSV,IDTYPE | |
13 | + ,NWHI,NWDI,ISET,IDET) | |
14 | C. | |
15 | C. ****************************************************************** | |
16 | C. * * | |
17 | C. * returns volume parameters for detector IUDET of set IUSET* | |
18 | C. * * | |
19 | C. * Input parameters * | |
20 | C. * IUSET set identifier (4 characters), user defined * | |
21 | C. * IUDET detector identifier (4 characters), name of an * | |
22 | C. * existing volume * | |
23 | C. * * | |
24 | C. * Output parameters * | |
25 | C. * NV number of volume descriptors * | |
26 | C. * NAMESV vector of NV volume descriptors (4 characters) * | |
27 | C. * NBITSV vector of NV bit numbers for packing the volume * | |
28 | C. * numbers * | |
29 | C. * IDTYPE detector type, user defined * | |
30 | C. * NWHI number of words for the primary allocation of HITS * | |
31 | C. * banks * | |
32 | C. * NWDI number of words for the primary allocation of DIGI * | |
33 | C. * banks when first allocation not sufficient * | |
34 | C. * ISET position of set in bank JSET * | |
35 | C. * IDET position of detector in bank JS=IB(JSET-ISET) * | |
36 | C. * If ISET=0 or IDET=0 error * | |
37 | C. * Remarks: * | |
38 | C. * - The vector NAMESV (length NV) contains the list of volume * | |
39 | C. * names which permit the identification of every physical * | |
40 | C. * detector with detector name IUDET. [See example in HITS * | |
41 | C. * 110]. * | |
42 | C. * - Each element of the vector NBITSV (length NV) is the * | |
43 | C. * number of bits used for packing the number of the * | |
44 | C. * corresponding volume, when building the packed identifier * | |
45 | C. * of a given physical detector. * | |
46 | C. * - Vectors NAMESV and NBITSV must be dimensionned at least * | |
47 | C. * to NV in the calling routine. * | |
48 | C. * * | |
49 | C. * ==>Called by : <USER> * | |
50 | C. * Author R.Brun , M.Maire ********* * | |
51 | C. * * | |
52 | C. ****************************************************************** | |
53 | C. | |
54 | #include "geant321/gcbank.inc" | |
55 | #include "geant321/gcunit.inc" | |
56 | DIMENSION NBITSV(1) | |
57 | CHARACTER*4 NAMESV(1),IUSET,IUDET | |
58 | C. | |
59 | C. ------------------------------------------------------------------ | |
60 | C. | |
61 | ISET=0 | |
62 | IDET=0 | |
63 | C | |
64 | C Check if detector IUDET has been defined | |
65 | C | |
66 | IF (JSET.LE.0) GO TO 90 | |
67 | NSET = IQ(JSET-1) | |
68 | IF (NSET.LE.0) GO TO 90 | |
69 | CALL GLOOK(IUSET,IQ(JSET+1),NSET,ISET) | |
70 | IF (ISET.EQ.0) GO TO 90 | |
71 | JS = LQ(JSET-ISET) | |
72 | NDET = IQ(JS-1) | |
73 | IF (NDET.LE.0) GO TO 90 | |
74 | CALL GLOOK(IUDET,IQ(JS+1),NDET,IDET) | |
75 | IF (IDET.EQ.0) GO TO 95 | |
76 | JD=LQ(JS-IDET) | |
77 | NV=IQ(JD+2) | |
78 | NWHI=IQ(JD+7) | |
79 | NWDI=IQ(JD+8) | |
80 | C | |
81 | IF(NV.GT.0)THEN | |
82 | DO 10 I=1,NV | |
83 | CALL UHTOC(IQ(JD+2*I+ 9),4,NAMESV(I),4) | |
84 | NBITSV(I)=IQ(JD+2*I+10) | |
85 | 10 CONTINUE | |
86 | ENDIF | |
87 | C | |
88 | CALL GFATT(IUDET,'DTYP',IDTYPE) | |
89 | GO TO 99 | |
90 | C | |
91 | 90 WRITE (CHMAIL, 1000) IUSET | |
92 | CALL GMAIL(0,0) | |
93 | 1000 FORMAT (' ***** GFDET ERROR SET ',A4,' NOT FOUND') | |
94 | GO TO 99 | |
95 | 95 WRITE (CHMAIL, 2000) IUSET,IUDET | |
96 | CALL GMAIL(0,0) | |
97 | 2000 FORMAT (' ***** GFDET ERROR FOR SET ',A4, | |
98 | + ' DETECTOR ',A4,' NOT FOUND') | |
99 | C | |
100 | 99 RETURN | |
101 | END |