!--------------------------------------------------------------------
!
!      CALSAS RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!--------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
!            PR
!   DATE   NUMBER  User      Description
! -------- ------  --------- -------------------------------------
! 09/30/96 31813   Rose      Created 
! 06/24/99 38324   WMiller   Set ENV vars
! 11/30/99 39546   Rose      Unix version
! 01/31/01 43165   MSwam     Add ARCH_SERVER,ARCH_DB for nocal check
! 10/29/01 43960   J.Baum    set normal status for AC stage to w
! 06/17/02 45279   Slowinski change trigger order
! 06/17/02 45279   Slowinski remove db related entries
! 06/24/04 51412   Sherbert  For PR 50437 Remove DISPLAY_ORDER
! 03/29/05 50546   Slowinski Create calsas resource file
! 11/13/06 49671   Hamilton  Changed HT to FT
! 10/14/10 61157   MSwam     Trigger OM (csum generation) next
!
!--------------------------------------------------------------------

PROCESS_NAME = calsas		! Short name for process id
TASK = <xpoll -p $PATH_FILE -r calsti>
CLASS = STI
DESCRIPTION = 'STIS calibration'
SYSTEM = OPUS
COMMAND = calsti.csh		! Name of the command procedure

OSF_RANK = 1			! First Trigger
OSF_TRIGGER1.CA = w		! Need a 'Wait for CALSTIS' flag in Calibration
OSF_TRIGGER1.DATA_ID = sdm	! Also need the Data_id set to STIS
OSF_TRIGGER2.CA = w		! Need a 'Wait for CALSTIS' flag in Calibration
OSF_TRIGGER2.DATA_ID = sas	! STIS Association
OSF_TRIGGER3.CA = w		! Need a 'Wait for CALSTIS' flag in Calibration
OSF_TRIGGER3.DATA_ID = sti	! STIS Association

OSF_PROCESSING.CA  = p		! Set the processing flag to 'Processing'

XPOLL_STATE.01 = OSF_NORMAL	! Normal: Completed the CALSTIS step
OSF_NORMAL.CA	   = c		! Normal: Completed CALIBRATION
OSF_NORMAL.OM	   = w		! Normal: trigger csum

XPOLL_STATE.03 = OSF_ERROR	! Return status of 03 indicates error.
OSF_ERROR.CA       = e		! Error:  Set the error flag

XPOLL_STATE.07 = OSF_NOCAL	! Exit status = 7 means no calibration.
OSF_NOCAL.CA	   = n		! No calibration required.
OSF_NOCAL.OM	   = n		! No calibration required.
OSF_NOCAL.AC	   = n		! No calibration required.
OSF_NOCAL.FT	   = w		! No calibration required.

XPOLL_STATE.09 = OSF_SDM	! Exit status = 9 means no calibration.
OSF_SDM.CA	   = n		! No calibration required.
OSF_SDM.OM	   = n		! No calibration required.
OSF_SDM.AC	   = n		! No calibration required.
OSF_SDM.RQ	   = w		! No calibration required.

XPOLL_STATE.11 = OSF_NO_CCI     ! Exit status = 11 means no csum/cci processing.
OSF_NO_CCI.CA	   = c		! calibration complete
OSF_NO_CCI.OM	   = n		! No csum/cci processing required.
OSF_NO_CCI.AC	   = w		! next stage

XPOLL_ERROR.CA = x              ! Set osf to this if exit state is undefined.

POLLING_TIME       = 10		   ! Wait (seconds) before polling for next 
ENV.INPATH  	   = STI_SIS_DIR   ! Directory where the input files are found
ENV.OUTPATH 	   = STI_CAL_DIR   ! Directory where output files are written
ENV.STI_SUM_DIR    = STI_SUM_DIR   ! csum output area
ENV.USE_CSUM       = use_stis_csum ! set FALSE in path to suppress CSUM files
MINBLOCKS 	   = 1000000	   ! blocks required on output disk
EXTENSION 	   = _raw.fits	   ! This input file extension must exist
