!-------------------------------------------------------------------------------
!
!      AC_COS 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  Developer  Description
! -------- -------- ---------  -------------------------------------------------
! 09/12/01 44327    MSwam      First version
! 10/29/01 43960    J.Baum     Add ENV FGS variables for Perl script
! 09/23/02 46357    Sherbert   PyRAF TERM override (hopefully temporary?)
! 03/24/03 48019    Rose       Stolen from ac_acs.resource
! 10/08/03 49496    MSwam      Change OTFR_WORLD to UPDATE_ASN_PRODUCT_STATUS
! 11/13/06 49671    Hamilton   Changed HT to FT and set FT = w for OSF_NORMAL.
!                              Removed setting of the RQ stage.
! 11/01/07 58468    Sherbert   DB now does job of ac_renamefits.csh
! 10/29/08 55769    MSwam      Run a generic version
! 01/12/09 60896    Sherbert   Use ac_xxx.py
! 02/05/13 70908    Sherbert   prevent incomplete ASNs from automatically ingesting
! 05/05/13 70908    Sherbert   remove FGS dependencies
!
!-------------------------------------------------------------------------------

PROCESS_NAME = ac_cos            ! Short name for process id
TASK = <xpoll -p $PATH_FILE -r ac_cos>
COMMAND = ac_xxx.py              ! Name of the command procedure
DESCRIPTION = 'COS post-calibration tasks'
SYSTEM = OPUS
CLASS = COS

OSF_RANK = 1                     ! First Trigger
OSF_TRIGGER1.AC = w              ! wait in calibration
OSF_TRIGGER1.DATA_ID = coa       ! COS association 

OSF_TRIGGER2.AC = w              ! wait in calibration
OSF_TRIGGER2.DATA_ID = cos       ! COS non-association 

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

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

XPOLL_STATE.01 = OSF_ERROR       ! Error during post-calibration
OSF_ERROR.AC       = e           ! 

XPOLL_STATE.03 = OSF_MISSING_PRODUCT ! Let Ops decide if this is OK
OSF_MISSING_PRODUCT.AC  = m      ! asn_member.product_status set to N

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

POLLING_TIME       = 10          ! Wait (seconds) before polling for next 

MINBLOCKS          = 50000       ! 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

! asn_product_status.py needs
ENV.OK_TO_UPDATE_DATABASE     = OK_TO_UPDATE_DATABASE ! defined in PATH file
ENV.UPDATE_ASN_PRODUCT_STATUS = update_asn_product_status
!
ENV.ARCH_SERVER = ARCH_SERVER
ENV.ARCH_DB = ARCH_DB
ENV.OPUS_SERVER = OPUS_SERVER
ENV.OPUS_DB = OPUS_DB
ENV.KW_SERVER = KW_SERVER
ENV.KW_DB   = KW_DB
