C   14/08/84 408271210  MEMBER NAME  MUPR23   (PWMUS)       FORTRAN
C   16/12/80 104100755  MEMBER NAME  MUPR23   (JADEMUS)     FORTRAN
C
C  LAST CHANGE 11.00 14/08/84 P.WARMING    - OUTPUT COMMENTED
C       CHANGE 07.30 10/04/81 HUGH MCCANN  - JADEMUS UPDATE.
C       CHANGE 09.00 19/12/80  HUGH MCCANN.
C-----------------------------------------------------------------------
C
      SUBROUTINE MUPR23
C
C
C  THIS ROUTINE WRITES OUT BANK MUR2/3.
C
      IMPLICIT INTEGER*2 (H)
#include "cmubcs.for"
C
C  FIND MUR1/0 TO GET NO. OF MUON HITS IN THIS EVENT.
C
      CALL CLOC(IND10,'MUR1',0)
      IF(IND10.LE.0)GO TO 21
      NHITS=IDATA(IND10+1)
C
C  FIND MUR2/0 TO GET NO. OF TRACKS PER HIT KEPT IN MUR2/2.
C
      CALL CLOC(INDEX0,'MUR2',0)
      IF(INDEX0.LE.0)GO TO 2
      NTPH=IDATA(INDEX0+3)
C
C  FIND MUR2/2
C
      CALL CLOC(INDEX,'MUR2',2)
      IF(INDEX.LE.0)GO TO 1
C
C  FIND MUR2/3
C
      CALL CLOC(INDEX3,'MUR2',3)
      IF(INDEX3.LE.0)GO TO 31
C
      WRITE(6,600)
  600 FORMAT('0 MUR2/3    MUON HIT AMBIGUITY FLAG FOR EACH ENTRY IN',
     *       ' MUR2/2'/'    HIT#   1ST 2ND 3RD 4TH TRACK')
C
C  LOOP ROUND HITS.
      NP1=1
      IP2=INDEX3+INDEX3
      DO 10 I=1,NHITS
      NP2=NP1+NTPH-1
      WRITE(6,7)I,(HDATA(IP2+J),J=NP1,NP2)
    7 FORMAT(' ',I5,4X,10I4)
      NP1=NP1+NTPH
   10 CONTINUE
      RETURN
   21 CONTINUE
C
C  BANK MUR1/0 DOES NOT EXIST
C
      WRITE(6,121)
  121 FORMAT('0',21X,'*****  BANK MUR1/0 DOES NOT EXIST  *****')
      RETURN
C
    1 CONTINUE
C
C  BANK MUR2/2 DOES NOT EXIST
C
      WRITE(6,100)
  100 FORMAT('0',21X,'*****  BANK MUR2/2 DOES NOT EXIST  *****')
      RETURN
    2 CONTINUE
C
C  BANK MUR2/0 DOES NOT EXIST
C
      WRITE(6,110)
  110 FORMAT('0',21X,'*****  BANK MUR2/0 DOES NOT EXIST  *****')
      RETURN
   31 CONTINUE
C
C  BANK MUR2/3 DOES NOT EXIST
C
      WRITE(6,131)
  131 FORMAT('0',21X,'*****  BANK MUR2/3 DOES NOT EXIST  *****')
      RETURN
      END
