!-------------------------------------------------------------------------------
!
! Name: retacs.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
! -------- -------- ---------  -------------------------------------------------
! 09/22/98 36848    MSwam      first version 
! 10/20/98 36860    MSwam      add PASSWORD and time trigger 
! 11/13/98 36860_02 MSwam      remove logfile resource
! 02/22/99 38284_02 MSwam      remove MINBLOCKS (no disk space needed)
! 06/25/99 38324    WMiller    Set ENV vars
! 04/22/02 44741    WMiller    Add ^CL to COMMAND
! 07/01/02 46074    MSwam      Add DISK_SPACE exit status
! 09/10/02 46357    Sherbert   Set OSF_RANK=2,TIME_RANK=1 so process will go 
!                              absent on incorrect password without failing OSFs
! 05/27/03 45889    MSwam      add FITS_CHECK to allow fitsverify suppression
! 06/10/02 43915    WMiller    remove time trigger/password`
! 06/03/03 43915    Sherbert   Incorporate 45889 resource control of fits check
! 11/18/03 49769    jschultz   add mnemonics that are used to specify command
!                              line options when the fitsverify tool is invoked
!                              by the retxxx.sh shell script
! 03/17/04 49769    Sherbert   Make fitsverify reporting less verbose
! 07/25/08 60382    Hamilton   Added ACS_REPING_DIR, REPRO_ACCOUNT, 
!                              REPRO_ING_PATH, and REPRO_SCI_PATH
!-------------------------------------------------------------------------------
PROCESS_NAME = retacs           ! Short name for process id
TASK         = <xpoll -p $PATH_FILE -r retacs>
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 = acs      ! 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   = acs_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.ACS_REPING_DIR = acs_repro_ing_dir
ENV.REPRO_ACCOUNT = reprocessing_account
ENV.REPRO_ING_PATH = reprocessing_ingest_path
ENV.REPRO_SCI_PATH = data_reduction_path
