subroutine get_gain(gain) use cesrv_struct use cesr_basic_mod use cesr_read_data_mod implicit none type (but_value_struct) gain(0:120) integer i, ios integer iu integer ix character(130) gain_file character(130) line_in, correction_file character(20) :: r_name = 'get_gain' namelist / button_gains / gain ! do i = lbound(gain, 1), ubound(gain, 1) gain(i)%value = [1, 1, 1, 1] enddo if (.not. logic%gain_correction) return call fullfilename (logic%btns_gain_correction_file, correction_file) call set_bpm_button_correction_file (gain_file = correction_file) iu=lunget() open (iu, file = correction_file, status = 'old', iostat = ios) if (ios /= 0) then call out_io (s_fatal$, r_name, 'CANNOT OPEN BPM GAIN FILE: ' // correction_file) call err_exit endif read (iu, nml = button_gains) close (iu) end subroutine