C   14/08/84 408271206  MEMBER NAME  MUPR11   (PWMUS)       FORTRAN
C   16/02/81 104100753  MEMBER NAME  MUPR11   (JADEMUS)     FORTRAN
C   11/02/81 102152052  MEMBER NAME  MUPR11P  (S)           FORTRAN
C   26/03/80 010211752  MEMBER NAME  MUPR11   (JADEMUS1)    FORTRAN
C
C LAST CHANGE 10.30 14/08/84 P. WARMING   - OUTPUT COMMENTED
C      CHANGE 07.30 10/04/81 HUGH MCCANN  - JADEMUS UPDATE.
C      CHANGE 15.05  19/02/81  HUGH MCCANN.
C                     26/03/80  HUGH MCCANN.
C-----------------------------------------------------------------------
C
      SUBROUTINE MUPR11(NHITS,NWHIT) 
C
C
C  ROUTINE TO PRINT THE MUR1 BANKS 1&2---I.E. THE RESULTS
C  OF THE SIGNAL-TO-COORDINATE CONVERSION PROCEDURE.
C
      IMPLICIT INTEGER*2 (H)
C PMF 03.11.98 
      LOGICAL TBIT
#include "cmubcs.for"
      LOGICAL BADT,BADL,BADX,BADY,BADZ,WOTZ,WOTY,WOTX,FOUR
C
C  FIND MUR1/1 & MUR1/2.
      CALL CLOC(IP11,'MUR1',1)
      IF(IP11.LE.0)GO TO 97
      CALL CLOC(IP12,'MUR1',2)
      IF(IP12.LE.0)GO TO 98
      J12=2*IP11-NWHIT
      J22=2*IP12
      DO 10 I=1,NHITS
      J12=J12+NWHIT
      ICHAM=HDATA(J12+1)/4
      IHIT= HDATA(J12+1)-4*ICHAM+1
      ITD=1
      ITL=1
      IX=1
      IY=1
      IZ=1
      JX=1
      JY=1
      JZ=1
      IFOUR=1
      J22=J22+1
      BADT=.NOT.TBIT(HDATA(J22),14)
      BADL=.NOT.TBIT(HDATA(J22),15)
      BADX=.NOT.TBIT(HDATA(J22),11)
      BADY=.NOT.TBIT(HDATA(J22),12)
      BADZ=.NOT.TBIT(HDATA(J22),13)
      WOTZ=.NOT.TBIT(HDATA(J22),10)
      WOTY=.NOT.TBIT(HDATA(J22),9)
      WOTX=.NOT.TBIT(HDATA(J22),8)
      FOUR=.NOT.TBIT(HDATA(J22),7)
      IF(BADT)ITD=0
      IF(BADL)ITL=0
      IF(BADX)IX=0
      IF(BADY)IY=0
      IF(BADZ)IZ=0
      IF(WOTX)JX=0
      IF(WOTY)JY=0
      IF(WOTZ)JZ=0
      IF(FOUR)IFOUR=0
      IF (I.EQ.1) WRITE(6,100)
      WRITE(6,101)I,ICHAM,IHIT,ITD,ITL,IZ,IY,IX,JZ,JY,JX,IFOUR
  100 FORMAT('0 MUR1/1    MUON COORDINATES'/
     * ' ',19X,'       ....VALIDITY OF....       NORMAL COOR 1.HIT'/
     * '    HIT# CHAMBER HIT       TIME LONG   Z  Y  X         Z  Y ',
     * ' X    LOST')
  101 FORMAT(' ',I5,I9,'  /',I2,5X,I6,I4,2X,3I3,7X,3I3,I8)
   10 CONTINUE
      RETURN
   97 CONTINUE
      WRITE(6,970)
  970 FORMAT('0 ******* MUR1/1 NOT FOUND ********')
      RETURN
   98 CONTINUE
      WRITE(6,980)
  980 FORMAT('0 ******* MUR1/2 NIT FOUND ********')
      RETURN
      END
