!-------------------------------------------------------------------------------
!
!      CAT_COS RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!-------------------------------------------------------------------------------
!                          REVISION HISTORY
!-------------------------------------------------------------------------------
!   DATE     PR  Developer  Description
! -------- ----- ---------- ----------------------------------------------------
! 01/27/03 45981 Rose       Initial version
! 11/05/03 49564 Rose       Install in the pipeline
! 11/13/03 49564 Rose       AP is taken by ast_pipeline.  Use SC
! 11/14/03 49564 Rose       Add the ASNPATH and cross-wire the db
! 04/09/04 50429 Goldst     Corrected ARCH* keyword values and removed note
! 04/21/04 50429 Sherbert   Change ASNPATH to use *_CAL_DIR 
! 04/21/04 50429 Sherbert   Remove SAVE_INSERT_HISTORY for 50823
! 05/03/04 50955 Goldst     Changed to trigger hkp_sci process
! 06/24/04 51412 Sherbert   For PR 50437 Remove DISPLAY_ORDER
! 07/19/06 52625 Sherbert   Remove extraneous OSF_RANK entry
! 02/22/08 58278 Sherbert   Correct ASN data_ids, add DATA_IDs for DIA, EDT 
! 03/10/09 62166 Sherbert   Move copy file creation to SC before cat'g
! 09/18/12 72255 Sherbert   get rid of DSQUERY
!
!-------------------------------------------------------------------------------

PROCESS_NAME = catalog  ! Short name for process id
TASK = <catalog -p $PATH_FILE -r cat_cos>
CLASS = COS
INSTRUMENT = COS
DESCRIPTION = 'Archive Catalog Ingest'
SYSTEM = OPUS
OK_TO_UPDATE_DATABASE = TRUE

! 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 = k         ! Waiting for catalog population
OSF_TRIGGER1.DATA_ID = coa  ! Also need the Data_id set 

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

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

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

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

OSF_PROCESSING.SC  = p      ! Set the processing flag to 'Processing'
OSF_NORMAL.SC = u           ! Normal: Trigger the hkp_sci process
OSF_SKIP_CATALOG.SC = u     ! SKIP_CLASSES:  Trigger the hkp_sci process, too

OSF_ERROR.SC  = e           ! Error:  Set the trouble flag

POLLING_TIME  = 10          ! Wait (seconds) before polling for next 
INPATH        = COS_CAL_DIR ! Directories where the FITS files are found
ASNPATH       = COS_CAL_DIR ! Directory where the _asn.fits files are
LOG_DIR       = LOG_DIR     ! Location for catalog log files
SEPARATE_MEMBERS = TRUE     ! members ARE in separate files 
ASSOC_IS_MEMBER  = TRUE     ! Association IS in member table 
MEMBER_DATA_ID   = cos      ! Need this when processing associations
ASSOCIATION_ID   = coa      ! Data_id for the association

! The following is only TRUE for FGS ASNs
PRODUCTS_AND_ORPHANS = FALSE     ! catalog exposures, products, and orphans

MINBLOCKS     = 50000       ! blocks required on output disk
EXTENSION     = .fits       ! This input file extension must exist

! forces values from path to be used (unless overridden in opus_login?)

ENV.OPUS_SERVER = OPUS_SERVER
ENV.OPUS_DB     = OPUS_DB
ENV.KW_SERVER   = KW_SERVER
ENV.KW_DB       = KW_DB
ENV.ARCH_SERVER = ARCH_SERVER
ENV.ARCH_DB     = ARCH_DB
