C   11/03/79 C9073101   MEMBER NAME  PRITOL   (SOURCE)      FORTRAN
      SUBROUTINE PRITOL(MODE)
C
C     S.YAMADA   18-01-79   18:20
C     LAST MODIFICATION   29-07-79  23:51  CLGWORK2
C
      IMPLICIT INTEGER *2 (H)
C
C
#include "clgwork2.for"
C
      DIMENSION IPHIL(10),IZL(10)
C
      IF(MODE.EQ.2) GO TO 1000
C
C---- DUMP THE SIMULATED CLUSTERS DUE TO THE INNER TRACKS.
C
      KE = NCHCLS+1
      WRITE(6,600) NCHCLS,NPOINT,(MAPCCL(K),K=1,KE)
  600 FORMAT('0 DUMP OF THE SIMULATED CLUSTERS   NCHCLS=',I3,'  NPOINT='
     $,         I4,/' MAPCCL',(10I5,3X,10I5,/'       '))
C
      IF(NPOINT) 2,2,1
    1 WRITE(6,601)
  601 FORMAT(' SIMULATED HITS')
      NP = NPOINT
      IF(NP.GT.300) NP=300
      N = NP/10
      NR = NP-10*N
      N1 = N
      IF(NR.GT.0) N1 = N1+1
      NS = -9
        DO 8 NN=1,N1
        NS = NS+10
        NE = NS+9
        IF(NN.EQ.N1.AND.NR.GT.0) NE = NS+NR-1
C----   POSITION   IPHI-IZ OR TOP/BOT-NUM
   13     DO 13  0 NW=NS,NE
          ID = HCLADR(NW)
          IF(ID.GE.2688) GO TO 131
          IPHI = ID/32
          IZ = ID-32*IPHI
          GO TO 133
  131     IZ = ID-2687
          IF(IZ.GE.96) GO TO 132
          IPHI = 90
          GO TO 133
  132     IZ = IZ-96
          IPHI = 91
  133     INDX = NW-NS+1
          IPHIL(INDX) = IPHI
          IZL(INDX) = IZ
  130     CONTINUE
        WRITE(6,613) NS,(IPHIL(NW),IZL(NW),NW=1,INDX)
  613   FORMAT(' ',I3,10(I4,1H-,I2,1H,))
    8   CONTINUE
C
    2 IF(MODE.EQ.1) RETURN
C
C---- PRINT CONNECTED LG-CLUSTERS FOR EACH INNER TRACK AND CONNECTED
C     INNER TRACKS FOR EACH LG-CLUSTER.
C
 1000 WRITE(6,602)
  602 FORMAT('0 INNER TR.  #OF CON.CL  --INDECES OF LG-CLUSTERS--',
     1    8X,' LG-CLUST.  #OF CON.TR   --INDECES OF INNER TRACKS--')
C
      MIN = NCHCL2
      IF(MIN.GT.NCLST2) MIN = NCLST2
      IF( MIN ) 15,15,11
C
   11   DO 10 N=1,MIN
        WRITE(6,603) N,(HCLIST(K,N),K=1,4),N,(HCLLSO(K,N),K=1,4)
  603   FORMAT(' ',I7,I10,I12,2I6,10X,'I',2I10,I12,2I6)
   10   CONTINUE
C
   15 MIN = MIN+1
      IF(NCLST2-NCHCL2) 1001,100,1002
C
 1001   DO 20 N=MIN,NCHCL2
        WRITE(6,603) N,(HCLIST(K,N),K=1,4)
   20   CONTINUE
      RETURN
C
 1002   DO 30 N=MIN,NCLST2
        WRITE(6,604) N,(HCLLSO(K,N),K=1,4)
  604   FORMAT(' ',51X,'I',2I10,I12,2I6)
   30   CONTINUE
C
  100 RETURN
      END
