!----------------------------------------------------------------------------
!
!      BC_NCA RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!----------------------------------------------------------------------------
!                          REVISION HISTORY
!----------------------------------------------------------------------------
! DATE     PR      Author    Description
! -------- ------- --------- -----------------------------------------------
! 07/12/96 31813   Rose      Created 
! 06/24/99 38324   WMiller   Set ENV vars
! 11/30/99 39546   Rose      Unix version
! 01/31/01 43165   MSwam     Add ARCH_SERVER,ARCH_DB for nocal check
! 11/02/01 44524   J.Baum    Add ENV variables for exposure_times.pl
! 01/30/02 44524_1 J.Baum    Fix value of OK_TO_UPDATE_DATABASE
! 03/14/02 45319   Sherbert  Get NO_CAL XPOLL_STATE to agree w/script
! 10/08/03 49496   MSwam     change OTFR_WORLD to UPDATE_EXPOSURE_TIMES
! 11/13/03 49799   J.Baum    Add FGS_DATA_ID ENV parameter 
! 06/24/04 51412   Sherbert  For PR 50437 Remove DISPLAY_ORDER
! 11/13/06 49671   Hamilton  Changed HT to FT
! 07/09/08 60367   MSwam     Trigger RUNTEMPFROMBIAS next
! 06/01/10 64909   Sherbert  Set AC=w for singletons for QUAL*
!
!----------------------------------------------------------------------------

PROCESS_NAME = bc_nca           ! Short name for process id
TASK = <xpoll -p $PATH_FILE -r bc_nca>
CLASS = NIC
DESCRIPTION = 'Nicmos pre calibration for members'
SYSTEM = OPUS
COMMAND = bc_nca.csh            ! Name of the command procedure

OSF_RANK = 1                    ! First Trigger
OSF_TRIGGER1.BC    = w          ! Need a 'Wait 
OSF_TRIGGER1.DATA_ID = nic      ! Also need the Data_id set to NICMOS

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

XPOLL_STATE.01 = OSF_NORMAL     ! Normal: Completed this step
OSF_NORMAL.BC      = t          ! Normal: Trigger RUNTEMPFROMBIAS next

XPOLL_STATE.03 = OSF_ERROR      ! Return status of 03 indicates error
OSF_ERROR.BC       = e          ! Error:  Set the error flag

XPOLL_STATE.07 = OSF_NOCAL      ! Exit status = 7 means no calibration.
OSF_NOCAL.BC       = c          ! No calibration required.
OSF_NOCAL.CA       = n          ! No calibration required.
OSF_NOCAL.AC       = w          ! Just incase QUAL* need updating

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

POLLING_TIME       = 10             ! Wait (seconds) before polling for next 
ENV.INPATH         = NIC_SIS_DIR    ! Directory where the input files are found
ENV.OUTPATH        = NIC_CAL_DIR    ! Directory where output files are written
MINBLOCKS          = 500000         ! blocks required on output disk
EXTENSION          = _raw.fits      ! This input file extension must exist

ENV.ARCH_SERVER    = ARCH_SERVER
ENV.ARCH_DB        = ARCH_DB

ENV.OPUS_DB = OPUS_DB
ENV.SPSS_DB = SPSS_DB
ENV.DSQUERY = DSQUERY
ENV.ASSIST_DB = ASSIST_DB
!     variables used by exposure_times.pl
ENV.OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! determined by path file
ENV.UPDATE_EXPOSURE_TIMES = update_exposure_times
ENV.FGS_PATH_NAME = FGS_PATH      ! fgs path name or NULL, set in path file
ENV.FGS_DATA_ID = fgs             ! data_id used in FGS pipeline for jitter
ENV.FGS_RCHECK_COLUMN = RJ        ! RCHECK stage in fgs pipeline
ENV.FGS_HOLD_STATUS = h           ! RJ value indicating a hold status  
ENV.FGS_RESTART_STATUS = w        ! RJ value to restart RCHECK process
