]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gdraw/gdnson.F
Better printing for MAXSTEP
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdnson.F
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 GDNSON(NAME,NSON,NDIV)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Return in NSON the number of sons of object NAME         *
17 C.    *       and in NDIV its number of divisions, always positive     *
18 C.    *       (NDIV=0 means no division)                               *
19 C.    *                                                                *
20 C.    *    ==>Called by : GDPRTR, GDSPEC, GDTR1                        *
21 C.    *       Author : P.Zanarini   *********                          *
22 C.    *                                                                *
23 C.    ******************************************************************
24 C.
25 #include "geant321/gcbank.inc"
26 #include "geant321/gcnum.inc"
27       CHARACTER*4 NAME
28 C.
29 C.    ------------------------------------------------------------------
30 C.
31       NSON=0
32       NDIV=0
33       CALL GLOOK(NAME,IQ(JVOLUM+1),NVOLUM,IVO)
34       IF (IVO.LE.0) GO TO 999
35       JVO=LQ(JVOLUM-IVO)
36       NIN=Q(JVO+3)
37       IF (NIN.EQ.0) GO TO 999
38       IF (NIN.GT.0) GO TO 10
39 C
40 C             Case of division
41 C
42       NSON=1
43       JIN=LQ(JVO-1)
44       NDIV=ABS(Q(JIN+3))
45       GO TO 999
46    10 NSON=NIN
47   999 RETURN
48       END