This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / ghits / gfdeta.F
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 GFDETA (IUSET,IUALI,IALI)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *     Returns the position IALI of the detector alias IUALI      *
17 C.    *                                                                *
18 C.    *    ==>Called by : <USER>,                                      *
19 C.    *       Author    F.Bruyant  *********                           *
20 C.    *                                                                *
21 C.    ******************************************************************
22 C.
23 #include "geant321/gcbank.inc"
24 #include "geant321/gcunit.inc"
25       CHARACTER*4 IUSET,IUALI
26 C
27 C.    ------------------------------------------------------------------
28 C.
29       IF (JSET.LE.0) GO TO 90
30       NSET = IQ(JSET-1)
31       IF (NSET.LE.0) GO TO 90
32       CALL GLOOK(IUSET,IQ(JSET+1),NSET,ISET)
33       IF (ISET.EQ.0) GO TO 90
34       JS = LQ(JSET-ISET)
35       NDET = IQ(JS-1)
36       IF (NDET.LE.0) GO TO 90
37       CALL GLOOK(IUALI,IQ(JS+1),NDET,IALI)
38       IF (IALI.EQ.0) GO TO 95
39       GO TO 99
40 C
41    90 WRITE (CHMAIL, 1000) IUSET
42       CALL GMAIL(0,0)
43  1000 FORMAT (' ***** GFDETA ERROR FOR SET ',A4)
44       GO TO 99
45    95 WRITE (CHMAIL, 2000) IUSET,IUALI
46       CALL GMAIL(0,0)
47  2000 FORMAT (' ***** GFDETA ERROR FOR SET ',A4,' ALIAS ',A4,
48      + ' NOT FOUND')
49 C
50    99 RETURN
51       END