!-------------------------------------------------------------------------------
!
! Name: retwf3.resource
!
! Purpose: This file is used to construct the trigger, error, and 
!          success status fields in the observation status file.
!
!   This resource file uses a file trigger.
!
!-------------------------------------------------------------------------------
!                          REVISION HISTORY
!-------------------------------------------------------------------------------
!            PR
!   DATE   NUMBER Developer  Description
! -------- ------ ---------- ----------------------------------------
! 04/01/08 59478  Sherbert   Add COS, WFC3 to OTFR
! 07/25/08 60382  Hamilton   Added WF3_REPING_DIR, REPRO_ACCOUNT,
!                            REPRO_ING_PATH, and REPRO_SCI_PATH
!-------------------------------------------------------------------------------

PROCESS_NAME = retwf3           ! Short name for process id
TASK         = <xpoll -p $PATH_FILE -r retwf3>
COMMAND      = 'retxxx.sh ^CL'  ! Name of the command procedure

DESCRIPTION  = 'Copy files from OTFR disk to DADS'
SYSTEM = OTFR
CLASS = otf 

OSF_RANK             = 1        ! If passwd correct, look for OSFs
OSF_TRIGGER1.RE      = w        ! OSF status column and
OSF_TRIGGER1.DATA_ID = wf3      ! OSF data_id field

OSF_PROCESSING.RE  = p          ! Set the processing flag to 'Processing'

OSF_NORMAL.RE      = c          ! Normal: Completed
OSF_NORMAL.RS      = w          ! Normal: Waiting for next stage

OSF_ERROR.RE       = e          ! Error:  Set the error flag

INSUFF_DISK_SPACE.RE = z        ! Not enough space in DADS, try later

MISSING_DIRECTORY.RE = m        ! missing remote directory

NO_FITS_FILES.RE   = n          ! No FITS files found to return
NO_FITS_FILES.RS   = w

XPOLL_STATE.00 = OSF_NORMAL
XPOLL_STATE.01 = OSF_ERROR
XPOLL_STATE.02 = NO_FITS_FILES
XPOLL_STATE.03 = INSUFF_DISK_SPACE
XPOLL_STATE.07 = MISSING_DIRECTORY

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

POLLING_TIME  = 10              ! Wait (seconds) before polling for next 
ENV.OUTPATH   = wf3_recalib     ! root directory for calibration directories
ENV.REQUEST_FILEEXT = request_work_ext  ! file extension for the OTFC_request

ENV.FITS_VERIFY = TRUE          ! indicates whether to perform a fits verification
                                ! on the fits files to be returned to DADS;
                                ! allowable values are: TRUE or FALSE   

ENV.FITS_VERIFY_LEVEL = s       ! indicates what level of verification to perform;
                                ! allowable values are: w, e, or s  
                                !   w = check for all warnings and all errors
                                !   e = only check for all errors; i.e., check for
                                !       regular and severe errors but ignore 
                                !       warnings
                                !   s = only check for severe errors; i.e., 
                                !       ignore warnings and regular errors

ENV.FITS_VERIFY_REPORT = q      ! indicates the amount of information to be
                                ! included in the verification report;
                                ! allowable values: q or v
                                !   q = generate a quiet verification report; i.e.,
                                !       generate a report indicating only if the
                                !       verification passed or failed
                                !   v = generate a verbose verification report;  
                                !       i.e., generate a detailed report about 
                                !       the verification including whether it
                                !       passed or failed
                                ! The FITS verification reports that are generated
                                ! are written to the process log file
ENV.WF3_REPING_DIR = wf3_repro_ing_dir
ENV.REPRO_ACCOUNT = reprocessing_account
ENV.REPRO_ING_PATH = reprocessing_ingest_path
ENV.REPRO_SCI_PATH = data_reduction_path
