* Last processed by NICE on 12-Jun-2000 15:53:00
* Customized for :  IEEE, LINUX, UNIX, MOTIF, F77
      SUBROUTINE FLAG_TI(N,TIMIN,TIMAX)
      INTEGER N
      REAL TIMIN,TIMAX
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (TIEM(I).GE.TIMIN .AND. TIEM(I).LE.TIMAX) THEN
            BADTI(I) = .TRUE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE GET_TI(N,TIMIN,TIMAX)
      INTEGER N
      REAL TIMIN,TIMAX
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (TIEM(I).GE.TIMIN .AND. TIEM(I).LE.TIMAX) THEN
            BADTI(I) = .FALSE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE GET_ALL(N)
      INTEGER N
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         BADUS(I) = .FALSE.
      ENDDO
      END
*<FF>
      SUBROUTINE FLAG_EL(N,ELMIN,ELMAX)
      INTEGER N
      REAL ELMIN,ELMAX
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (ELES(I).GE.ELMIN .AND. ELES(I).LE.ELMAX) THEN
            BADEL(I) = .FALSE.
         ELSE
            BADEL(I) = .TRUE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE FLAG_RM (N,RMSMAX)
      INTEGER N
      REAL RMSMAX
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (RMS(I).GE.RMSMAX) THEN
            BADRM(I) = .TRUE.
         ELSE
            BADRM(I) = .FALSE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE FLAG_RE (N,RES)
      INTEGER N
      REAL RES
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
      REAL R2
*
      R2 = RES**2
      DO I=1,N
         IF (RESAZ(I)**2+RESEL(I)**2 .GT. R2) THEN
            BADRE(I) = .TRUE.
            BADRE(I+N) = .TRUE.
         ELSE
            BADRE(I) = .FALSE.
            BADRE(I+N) = .FALSE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE FLAG_SOURCE (N,OBJECT)
      INTEGER N
      CHARACTER*(*) OBJECT
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (SOURCE(I).EQ.OBJECT) THEN
            BADUS(I) = .TRUE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE FLAG_SCAN (N,JSCAN)
      INTEGER N
      INTEGER JSCAN
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (SCAN(I).EQ.JSCAN) THEN
            BADUS(I) = .TRUE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE GET_SOURCE (N,OBJECT)
      INTEGER N
      CHARACTER*(*) OBJECT
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (SOURCE(I).EQ.OBJECT) THEN
            BADUS(I) = .FALSE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE GET_SCAN (N,JSCAN)
      INTEGER N
      INTEGER JSCAN
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I
*
      DO I=1,N
         IF (SCAN(I).EQ.JSCAN) THEN
            BADUS(I) = .FALSE.
         ENDIF
      ENDDO
      END
*<FF>
      SUBROUTINE GET_GOOD (N,NGOOD)
      INCLUDE 'size.inc'
      INCLUDE 'data.inc'
      INTEGER I,N,NGOOD
*
      NGOOD = 0
      DO I=1,N
         IF (BADUS(I).OR.BADEL(I).OR.BADRM(I).OR.BADRE(I)
     $   .OR.BADTI(I) ) THEN
            GOOD(I) = .FALSE.
         ELSE
            GOOD(I) = .TRUE.
            NGOOD = NGOOD+1
         ENDIF
      ENDDO
      END
