!-------------------------------------------------------------------------------
!
!      AC_ACS 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
! -------- ----- ---------- ----------------------------------------------------
! 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?)
! 10/08/03 49496 MSwam      Change OTFR_WORLD to UPDATE_ASN_PRODUCT_STATUS
! 05/20/04 51278 Sherbert   Increase MINBLOCKS to 200 million blocks (100 GB)
! 06/10/04 50605 Sherbert   Add DISPLAY to counter PyRAF error and HT=w so Ops
!                           no longer needs to override this file
! 07/08/04 51057 MSwam      Add DRIZZLE_TYPE 
! 09/07/04 51801 Sherbert   Break up MD from asn_product_status.pl (AC)
! 02/22/06 54699 MSwam      Parameterize to for tufnel,smalls,sthubbins
! 05/08/06 55509 Sherbert   Change comment for possible fgs path name
! 07/19/06 52625 Sherbert   Remove extraneous OSF_RANK entry
! 11/13/06 49671 Hamilton   Changed HT to FT
! 10/29/08 55769 MSwam      Run a generic version
! 01/12/09 60896 Sherbert   Use ac_xxx.py
! 09/08/11 69025 Sherbert   remove an old comment
!
!-------------------------------------------------------------------------------

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

OSF_RANK = 1                ! OSF Triggers
OSF_TRIGGER1.AC = w         ! wait in calibration
OSF_TRIGGER1.DATA_ID = aca  ! ACS association normally

OSF_TRIGGER2.AC = w         ! wait in calibration
OSF_TRIGGER2.DATA_ID = acs  ! ACS singletons too

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 calibration
OSF_ERROR.AC       = f      ! 

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

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

MINBLOCKS           = big_MINBLOCKS ! blocks required on output disk
ENV.INPATH          = ACS_SIS_DIR   ! Where the .trx file is found
ENV.OUTPATH         = ACS_CAL_DIR   ! Directory where output files are written

ENV.TERM    = vt100  ! PyRAF doesn't seem to get this correctly from environment 
ENV.DISPLAY = ""     ! PyRAF fails with XWindows exception if it cannot open DISPLAY

!! asn_product_status.pl needs
ENV.OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! defined in PATH file
ENV.UPDATE_ASN_PRODUCT_STATUS = update_asn_product_status
ENV.FGS_PATH_NAME   = FGS_PATH      ! defined in PATH file (NONE used for none)
ENV.FGS_ASN_COLUMN  = DC            ! FGS pipeline stage for BLDASN process
ENV.FGS_HOLD_STATUS = h             ! value indicating FGS is waiting on OPUS
ENV.FGS_RESTART_STATUS = w        ! value to restart FGS pipeline BLDASN process
!
ENV.ARCH_SERVER = ARCH_SERVER
ENV.ARCH_DB = ARCH_DB
ENV.OPUS_SERVER = OPUS_SERVER
ENV.OPUS_DB = OPUS_DB
