!--------------------------------------------------------------------
!
!      CALCOA 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
! -------- ------  ---------- -------------------------------------
! 07/23/03 60293   Sherbert   do ASNs first
! 02/23/09 61512   Sherbert   COS accumulated image changes
! 09/03/09 63026   Sherbert   Add a NOCAL exit
! 09/10/10 61157   MSwam      trigger OM (CSUM generation) next
! 02/21/13 73570   MSwam      special exitstatus=16 allows CCI then quit
! 02/27/13 73683   MSwam      Add USE_REPEATABLE_RANDSEED setting
! 
!--------------------------------------------------------------------
PROCESS_NAME = calcoa           ! Short name for process id
TASK = <xpoll -p $PATH_FILE -r calcoa>
COMMAND = calcos.csh            ! Name of the command procedure
DESCRIPTION = 'COS Calibration'
SYSTEM = OPUS
CLASS = COS

OSF_RANK = 1                    ! First Trigger
OSF_TRIGGER1.CA = w             ! pick up associations
OSF_TRIGGER1.DATA_ID = coa      ! 

OSF_TRIGGER2.CA = w             ! pick up singletons
OSF_TRIGGER2.DATA_ID = cos      ! 

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

XPOLL_STATE.00 = OSF_NORMAL     ! Normal: Completed calibration successfully
OSF_NORMAL.CA      = c          ! 
OSF_NORMAL.OM      = w          ! Wait for next stage

XPOLL_STATE.05 = OSF_NOCAL      ! Normal: no calibration required (eg ACQs)
OSF_NOCAL.CA       = n          ! 
OSF_NOCAL.OM       = w          ! Wait for next stage

XPOLL_STATE.16 = OSF_CCI_QUIT   ! Do the CCI processing then QUIT
OSF_CCI_QUIT.CA    = b          ! use a special failure code for this case
OSF_CCI_QUIT.OM    = s          ! failed, trigger CCI anyway (then stop)

XPOLL_STATE.01 = OSF_ERROR      ! Error during calibration
OSF_ERROR.CA       = e          ! 

XPOLL_ERROR.CA = 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.INPATH         = COS_SIS_DIR  ! Where the .trx file is found
ENV.OUTPATH        = COS_CAL_DIR  ! Directory where output files are written
ENV.USE_CSUM       = use_cos_csum ! set FALSE in path to suppress csum files
ENV.CSUM_DIR       = COS_SUM_DIR  ! Directory in which to move the csum files 
ENV.USE_REPEATABLE_RANDSEED = USE_REPEATABLE_RANDSEED
                              ! path setting will determine whether to
                              ! perform optimum calibration, using
                              ! non-repeatable random number seed
