!--------------------------------------------------------------------
!
!      CSUM_STI RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!--------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
!            PR
! mm/dd/yy NUMBER  User       Description
! -------- ------  ---------- -------------------------------------
! 09/10/10 61157   MSwam      first version
! 10/14/10 61157   Mary       added STI_CAL_DIR and fixed STI_SUM_DIR
!
!--------------------------------------------------------------------
PROCESS_NAME = csum_sti ! Short name for process id
TASK = <xpoll -p $PATH_FILE -r csum_sti>
COMMAND = csum_stis.csh            ! Name of the command procedure
DESCRIPTION = 'STIS cumulative image generation'
SYSTEM = OPUS
CLASS = STI

OSF_RANK = 1                    ! First Trigger
OSF_TRIGGER1.OM = w             ! pick up singletons
OSF_TRIGGER1.DATA_ID = sas      ! 

OSF_TRIGGER2.OM = w             ! pick up associations
OSF_TRIGGER2.DATA_ID = sti      ! 

OSF_PROCESSING.OM  = p          ! Set flag while 'Processing'

XPOLL_STATE.00 = OSF_NORMAL     ! Normal: Completed CSUM accumulation
OSF_NORMAL.OM      = c          ! 
OSF_NORMAL.AC      = w          ! Wait for next stage

XPOLL_STATE.01 = OSF_ERROR      ! Error during CSUM accumulation
OSF_ERROR.OM       = e          ! 

XPOLL_STATE.02 = OSF_NO_CSUM    ! No CSUM accumulation needed
OSF_NO_CSUM.OM      = n         ! 
OSF_NO_CSUM.AC      = w         ! Wait for next stage

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

POLLING_TIME       = 10         ! Wait (seconds) before polling for next 
MINBLOCKS            = 1000000  ! blocks required on output disk

ENV.STI_CAL_DIR    = STI_CAL_DIR  ! Directory where output files are written
ENV.OUTPATH        = STI_CCI_DIR  ! Directory where output files are written
ENV.STI_CCI_DIR    = STI_CCI_DIR  ! Directory where output files are written
                                  ! repeated for use by executables.
ENV.STI_SUM_DIR    = STI_SUM_DIR  ! where input CSUM files are found
!
! the current code REQUIRES that STI_CCI_DIR and MAMA_DIR reside on the same
! disk partition, since a hard-link is used to reference both areas to the
! same physical files
ENV.CCI_ARCHIVE_DIR = MAMA_DIR    ! where CCI files move for archiving

ENV.CCI_NO_FILES   = 3   ! cci_stis_check_change exit code for no CCI files
ENV.CCI_DIFFERENT  = 5   ! cci_stis_check_change exit code for closing CCI set
ENV.CCI_FILE_COUNT = 2   ! number of CCI files for STI
ENV.CCI_DATA_ID    = ssi ! data id for Cumulative Count Image archiving OSFs
ENV.CCI_ARCHIVE_TRIGGER = " -c RQ -s w "  ! OSF status to trigger CCI archiving

