5 * Revision 1.1.1.1 1995/10/24 10:20:28 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.27 by S.Giani
12 SUBROUTINE GDTR2(IROOT,JMAX,LEVMAX,IER)
14 C. ******************************************************************
16 C. * Scan all JVOLUM structure *
18 C. * IROOT = root of the tree to be built up (input) *
19 C. * JMAX = total number of nodes (output) *
20 C. * LEVMAX = maximum number of levels to be scanned *
21 C. * IER = error flag to detect nodes overflow (output) *
23 C. * ==>Called by : GDTR0 *
24 C. * Authors : P.Zanarini, S.Banerjee ********* *
26 C. ******************************************************************
28 #include "geant321/gcdraw.inc"
29 #include "geant321/gcunit.inc"
30 #include "geant321/gcbank.inc"
31 #include "geant321/gcnum.inc"
33 C. ------------------------------------------------------------------
45 IF (IQ(JSCA+J).EQ.0) THEN
46 CALL GDTR1(J,JMAX,JNEW,IER)
47 IF (IER.NE.0) GO TO 999
49 C Fill array IQ(JDVM+I) for multiplicity by divisioning
55 IVO=IUCOMP(IQ(JNAM+JJ),IQ(JVOLUM+1),NVOLUM)
60 IQ(JDVM+J)=ABS(Q(JIN+3))
67 IF (JMAX.GT.MAXNOD) GO TO 20
71 *** IF (J.LE.JMAX) GO TO 10
77 IF (LNOD.GT.LEVMAX.AND.LEVMAX.GT.0) GO TO 999
79 IF (J.LE.JMAX) GO TO 10
83 20 WRITE (CHMAIL,1000) MAXNOD
86 1000 FORMAT (' GDTR2 : MAXNOD = ',I5,' - TREE OVERFLOW')