      subroutine hec_online_gettrig
c
c routine to request name of run file for online monitoring
c
      implicit none
c
c datacard common
c
      include'hec_par.inc'      !shared parameters
      include'hec_datacard.inc'  ! datacard values
      include'hec_online.inc'    ! online common
c
c local variables
c
      logical tryagain
c
c query keyboard for run number to analyze
c
      tryagain = .true.
      do while (tryagain) 
         print *, ' *** Select Trigger type to analyse:'
         print *, ' *** = 1  : all event types'
         print *, ' *** = 2  : physics triggers'
         print *, ' *** = 3  : electron triggers'
         print *, ' *** = 4  : pion triggers'
         print *, ' *** = 5  : muon triggers'
         read(5,*,ERR=10) trigreq
         if (trigreq .ge. 1 .and. trigreq .le. 5) then 
            tryagain = .false.
         else
            print *, '*** Invalid Trigger selection, please try again'
            tryagain = .true. 
         endif
      enddo
c
      goto 11
 10   continue
      print *, '*** Error reading trigger request from keyboard '
      print *, '*** WARNING, I AM CHOOSING ALL EVENT TYPES'       
      trigreq = 1
 11   continue
c
      return
      end



