!--------------------------------------------------------------------
!
!      BC_COS RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!--------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
!            PR
!   DATE   NUMBER  User       Description
! -------- ------  ---------- -------------------------------------
! 10/18/02 46823   Rose       Template for BC_COS
! 03/24/03 48019   Rose       Trigger the AC stage
! 10/23/03 49468   MSwam      Trigger CA
! 06/25/08 60265   Sherbert   Use non-TV script to get trailers
! 07/11/08 60265   Sherbert   Use a bc_cos.csh script
! 09/18/12 72255  Sherbert   get rid of DSQUERY
! 05/05/13 70908 Sherbert   remove FGS dependencies
!
!--------------------------------------------------------------------
PROCESS_NAME = bc_cos		! Short name for process id
TASK = <xpoll -p $PATH_FILE -r bc_cos>
COMMAND = bc_cos.csh	! Name of the command procedure
DESCRIPTION = 'COS Before Calibration'
SYSTEM = OPUS
CLASS = cos

OSF_RANK = 1			! First Trigger
OSF_TRIGGER1.BC = w             ! wait in pre calibration
OSF_TRIGGER1.DATA_ID = coa	! COS exposures
OSF_TRIGGER2.BC = w             ! wait in pre calibration
OSF_TRIGGER2.DATA_ID = cos	! COS exposures

OSF_PROCESSING.BC  = p		! Set flag while 'Processing'

XPOLL_STATE.00 = OSF_NORMAL	! Normal: Completed pre calibration successfully
OSF_NORMAL.BC      = c		! 
OSF_NORMAL.CA      = w		! Wait for next stage

XPOLL_STATE.01 = OSF_ERROR	! Error during pre calibration
OSF_ERROR.BC       = e		! 

XPOLL_STATE.02 = OSF_NOCAL      ! Bypass calibration
OSF_NOCAL.BC       = c          ! skip before calibration
OSF_NOCAL.CA       = n          ! skip calibration
OSF_NOCAL.AC       = w          ! wait for after calibration

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

POLLING_TIME       = 10		 ! Wait (seconds) before polling for next 
MINBLOCKS 	   = 1000	 ! blocks required on output disk
ENV.INPATH         = COS_SIS_DIR ! Where the .trx file is found
ENV.OUTPATH        = COS_CAL_DIR ! Directory where output files are written

!! check_cal_stat.pl requires nothing.
!! exposure_times.pl requires these:
ENV.UPDATE_EXPOSURE_TIMES = update_exposure_times ! determined by path file 
ENV.OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! determined by path file 
!
ENV.OPUS_DB               = OPUS_DB 
ENV.OPUS_SERVER = OPUS_SERVER
