      subroutine hec_online_run_ini
c
c initialize for each run
c
      implicit none
c
      include'hec_par.inc'      ! shared parameters
      include'hec_evth.inc'     ! event header common
      include'hec_geo.inc'
      include'hec_his_sys.inc'  ! system histogram common
      include'hec_online.inc'   ! online common
      include'hec_ped.inc'      ! pedestal values
      include'hec_ped_sys.inc'  ! pedestal system common
c
      call vzero(i_trigcnt,ibittot)
c
c zero depth sums
c
      call vzero(depth_mom0,i_z_max)
      call vzero(depth_mom1,i_z_max)
      pion_count = 0
      elec_count = 0
      phys_trig_count = 0
c
c initialize cubic fit package
c
      call hec_cub
c
c delete histograms from last run
c
      call hdelet(0)
c
      end

