subroutine hec_online_ana1 c c calculate analysis variables c implicit none c include'hec_par.inc' ! shared parameters include'hec_geo.inc' ! geometry correspondence tables include'hec_his_sys.inc' ! histogram system common include'hec_online.inc' ! online common include'hec_runh.inc' ! run header common c c local variables c integer i_z real sum, ave, depth_ave(i_z_max) c c if adcs are not read out for this run, do not try to fill histograms c if (.not. calo_on_flag) then print *,' ' print *,'WARNING!!!: ADCs not read out, skipping most' + ,' histograms (hec_online_ana1)' print *,' ' return endif c c calculate pedestal mean and rms values c call hec_ped_ana1 c c call histo filling routine c call hec_his_ana1 c c get ratios of energies in different depths c sum = 0. do i_z = 1, i_z_used depth_ave(i_z) = depth_mom1(i_z)/depth_mom0(i_z) sum = sum + depth_mom1(i_z) enddo ave = sum/depth_mom0(1) do i_z = 1, i_z_used depth_frac(i_z) = depth_ave(i_z)/ave enddo c c output run sheet for triggers c call hec_trig_sheet c end