!-------------------------------------------------------------------------------
!
!      CAT_COS_COPIES RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file for the process that will create 
!      copies of certain parts of certain files for COS archive cataloging.
!
!-------------------------------------------------------------------------------
!                          REVISION HISTORY
!-------------------------------------------------------------------------------
!   DATE     PR  Developer  Description
! -------- ----- ---------- ----------------------------------------------------
! 03/10/09 62166 Sherbert   Move copy file creation to SC before cat'g
! 04/24/09 62166 Sherbert   Fix problem with data_ids that need no cataloging
!-------------------------------------------------------------------------------

PROCESS_NAME = cat_cos_copies  ! Short name for process id
TASK = <xpoll -p $PATH_FILE -r cat_cos_copies >
COMMAND = cat_cos_copies.py
CLASS = COS
INSTRUMENT = COS
DESCRIPTION = 'Archive Catalog Ingest Preparation'
SYSTEM = OPUS

! There is only one ingrsp for all SIs and it sets SC=w therefore
! cat_cos_copy will use w and set SC=k for cataloging COS
OSF_RANK = 1                ! OSF Triggers
OSF_TRIGGER1.SC = w         ! Waiting for catalog population
OSF_TRIGGER1.DATA_ID = coa  ! Also need the Data_id set 

OSF_TRIGGER2.SC = w         ! Waiting for catalog population
OSF_TRIGGER2.DATA_ID = cos  ! Data_id for associations

! These data ids all get the SKIP treatment (no cataloguing)
ENV.SKIP_CLASSES = "cdm,edl"    ! Data ids that skip cataloging

OSF_TRIGGER3.SC = w         ! Waiting for catalog population
OSF_TRIGGER3.DATA_ID = cdm  ! Data_id for associations

OSF_TRIGGER4.SC = w         ! Waiting for catalog population
OSF_TRIGGER4.DATA_ID = edl  ! Data_id for associations

POLLING_TIME  = 10          ! Wait (seconds) before polling for next 
OSF_PROCESSING.SC  = p      ! Set the processing flag to 'Processing'

XPOLL_STATE.00  = OSF_NORMAL ! Successful exit
OSF_NORMAL.SC = k            ! Normal: Trigger the cat_cos process

XPOLL_STATE.23 = OSF_SKIP_CATALOG   ! Skip cataloging, go to hkp
OSF_SKIP_CATALOG.SC = u              ! Set the hkp flag

XPOLL_STATE.01  = OSF_ERROR  ! Script encountered an error
OSF_ERROR.SC  = e            ! Error:  Set the trouble flag

XPOLL_STATE.102 = OSF_FAIL   ! Script encountered a bad error
OSF_FAIL.SC = f              ! Set the really troubled flag

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

ENV.KW_SERVER   = KW_SERVER
ENV.KW_DB       = KW_DB
ENV.OUTPATH = COS_CAL_DIR   ! Directory where output files are written

EXTENSION     = .fits       ! This input file extension must exist

