*file member=ft1_fitter library=snoman language=fortran77
*file date=24:Nov:1994
subroutine ft1_fitter(ipro_mode,iretc)
:
:
:
HEADER
:
:
:
* Local Variable Declarations:-
* ===========================
integer i_ft_retc
logical inputs_exist
** The fitter does not support append mode.
if ( ipro_mode .eq. KSU_APPEND ) then
write(iqlog,*) ' FT1 does not support append mode.'
iretc = KSU_UNSUPPORTED
ift1_retcs(iretc) = ift1_retcs(iretc) + 1
return
endif
** Prepare data structure, rolling back downstream processing
** if required.
call dsm_pro_prepare( KSU_FT1 , ipro_mode , iretc )
* If data structure manager does not signal O.K. then no
* further action.
if ( iretc .ne. KSU_OK ) then
ift1_retcs(iretc) = ift1_retcs(iretc) + 1
return
endif
** Loop over all EVs fitting each. Note if any fit fails.
lev = lq(lmast - KMAST_EV)
inputs_exist = lev .ne. 0
iretc = KSU_OK
do while (lev .gt. 0)
call ft1_fit_event( i_ft_retc )
if ( i_ft_retc .ne. KSU_OK ) iretc = KSU_FAILED
ift1_retcs(i_ft_retc) = ift1_retcs(i_ft_retc) + 1
lev = lq(lev)
enddo
** If any inputs exist signal processor complete to the
** data structure manager.
if ( inputs_exist ) then
call dsm_pro_complete( KSU_FT1 )
else
iretc = KSU_FAILED
endif
return
end
*endfile member=ft1_fitter
This routine first carries out some checks and prepares the data structure before looping over all EV banks produced by the event (i.e. picking up each trigger) and calling FT1_FIT_EVENT to do the actual fitting for each trigger. The user need change nothing in this routine.