;+ ; NAME: ; smei_blocked ; PURPOSE: ; Used to temporary block the real-time SMEI pipeline ; CATEGORY: ; camera/idl/toolbox ; CALLING SEQUENCE: FUNCTION smei_blocked, ignore_block=ignore_block ; OPTIONAL INPUT PARAMETERS: ; /ignore_block return values always 0 ; (pipeline NOT blocked) ; OUTPUTS: ; Result 0: pipeline not blocked ; 1: pipeline blocked ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar, txt_read, smei_filepath, hide_env ; PROCEDURE: ; File $SMEIDB/cat/sts/block/block_file.txt should contain 0 or 1 ; (the file needs to be edited manually). ; 1 means that the pipeline is blocked. ; The caller presumably will abort (unless /ignore_block is set) ; MODIFICATION HISTORY: ; DEC-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, ignore_block, /key IF ignore_block THEN $ RETURN, 0 block_file = filepath(root=smei_filepath(mode='sts'),subdir='block','block_pipeline.txt') IF NOT txt_read(block_file, block, /silent) THEN $ RETURN, 1 block = fix(block[0]) IF block THEN BEGIN message, /info, 'SMEI data pipeline is blocked' message, /info, 'to activate edit '+hide_env(block_file) RETURN, 1 ENDIF RETURN, 0 & END