! @(#)pipeline.start 14.1.1.7 (ESO-DMD) 07/28/00 16:41:35 ! +++++++++++++++++++++++++++++++++++++ ! ! Midas procedure pipeline.start for NTT/VLT pipeline ! K. Banse 961209, 970516, 981214, 990922, 000721 ! ! this procedure creates the additional keywords needed for the Pipeline ! ! if called within the context RBS it also takes parameters ! ! +++++++++++++++++++++++++++++++++++++~ ! write/keyw recipe_time/c/1/60 " " all write/keyword recipe_secs/i/1/3 0,0,0 !used for elapsed time write/keyword recipe_name/c/1/80 " " all !name of recipe ! write/keyw pipeline/i/1/15 0,1,0,0,0,0,300,0,0,-1,0,0,0,0,0 ! pipeline(1) = exit status of top level recipe ! = 0, o.k. - else look at keyword PROGSTAT for error code ! pipeline(2) = working_direc_delete_flag, ! 1 - delete old subdirectory ./tmp_XY_pipe ! and create new subdirectory ./tmp_XY_pipe ! 0 - stay where we are ! pipeline(3) = name counter for `set_of_frames.prg' on output, ! pipeline(4) = name counter for `set_of_frames.prg' on input, ! so they are static between log/recipe proc in + out ! pipeline(5) = display flag: 0 = we don't have display capabilities ! 1 = we have a display, ! 2 = we have a display linked to niceRBS ! this flag is set via procedure `pipeline.control' ! pipeline(6) = flag for super-recipe (1 = super rec., 0 = normal rec.) ! pipeline(7) = max_time in seconds of current recipe ! pipeline(8) = 1 if DFS_DATA_REDUCED_OLAS env.variable is set, else = 0 ! pipeline(9) = 1 for DFS_PIPE_ALLPRODUCTS env.variable = NO, else = 0 ! pipeline(10) = -1 or unit of connected display Midas (if we have one) ! pipeline(11) = Product_Overwrite_flag, 1 = Yes, 0 = No ! pipeline(12) = if = 1, RBs are executed inside Midas, else via RBS ! write/keyw pipeline_disp/c/1/20 none !to hold display from niceRBS !version of DO, RBS, DIC-PRO, Instrument_pipeline, each with 10 chars write/keyw pipeline_vers/c*10/1/4 " " all ! ! find out if we are running inside Midas (context RBS) show/context rbs >Null if outputi(5) .gt. 0 then pipeline(12) = 1 pipeline_vers(1) = "DO-0_0 " pipeline_vers(2) = "RBS-0_0 " pipeline_vers(3) = "PRO-0.0 " else ! ! the current version from env. variables DFS_RBS_VERS, DFS_DO_VERS ! pipeline_vers(1) = "DO-1_11 " !versions as of 000718 pipeline_vers(2) = "RBS-1_7 " pipeline_vers(3) = "PRO-1.3 " ! write/out > "get DO, RBS versions from variables DFS_DO_VERS, DFS_RBS_VERS" inputc = m$SYMBOL("DFS_DO_VERS") if inputc(1:3) .ne. "DFS" pipeline_vers(1) = inputc inputc = m$SYMBOL("DFS_RBS_VERS") if inputc(1:3) .ne. "DFS" pipeline_vers(2) = inputc ! write/out > "search for file ESO-VLT-DIC.PRO-x.y in " - "$INS_ROOT/SYSTEM/Dictionary" $\rm -f $MID_WORK/middumml.dat $ls $INS_ROOT/SYSTEM/Dictionary/ESO-VLT-DIC.PRO* >$MID_WORK/middumml.dat define/local fc/i/1/3 0,0,0 open/file MID_WORK:middumml.dat read fc if fc .ge. 1 then read/file {fc(1)} out_b 80 if fc(2) .gt. 0 then fc(3) = m$indexb(out_b,"PRO-") if fc(3) .gt. 0 then pipeline_vers(3) = out_b({fc(3)}:) endif endif close/file {fc(1)} endif if pipeline_vers(3)(1:1) .eq. " " then write/out - "Could not get DIC PRO version... will use" {pipeline_vers(3)} endif endif ! write/out > Pipeline will use: write/out " DO version:" {pipeline_vers(1)} write/out " RBS version:" {pipeline_vers(2)} write/out " DIC PRO version:" {pipeline_vers(3)} ! write/keyw pipeline_aux/i/1/8 2,0,80,2,0,0,0,0 !auxiliary flags ! pipeline_aux(1) = X-color for labels (default = 2 (white)) ! pipeline_aux(2) = font no. for labels (default = 0) ! pipeline_aux(3) = display size (as percent) ! pipeline_aux(4) = color of send/message ! pipeline_aux(5-8) = spares ! write/keyword rbname/c/1/120 " " all !name of RB definition file write/keyword rbinstrument/c/1/20 " " all !instrument of RB ! write/keyword recqualm/c/1/100 " " all !to hold the quality message write/keyword recquali/i/1/1 0 !the recipe quality status ! 0 = all o.k., else not o.k. write/keyword longlog/c/1/120 " " all !long log file form pipeline write/keyw base_name/c/1/128 " " all ! ! overwrite definition of command LOG/RECIPE ! set/midas user=exp show/context RBS !test, if we're called within context RBS if outputi(5) .eq. 0 then inputc = "NoDisplay" else inputc = p1 !in context RBS we're always called with P1 endif clear/cont -all set/midas commands=350,800 create/comm log/recipe @d recipe_log create/comm load/image @d pipeload !overwrite command create/comm send/message @d sendmess set/midas user=user ! @d pipeline.control {inputc} !default is No Display log(12) = -1 !so >Null doesn't log ! @d save_log init !init log date ! inputc = m$symbol("DFS_DATA_REDUCED_OLAS") !test, if var. is set if inputc(1:4) .ne. "DFS_" pipeline(8) = 1 !Yes. inputc = m$symbol("DFS_PIPE_ALLPRODUCTS") !test, if NO if inputc(1:1) .eq. "N" pipeline(9) = 1 !Yes.