IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 15, 2007, 3:05:56 PM (20 years ago)
Author:
eugene
Message:

using process_exit to handle error states, adding ipp_filename.pl and OUTPATH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_00/ippTasks/detrend.stack.pro

    r11019 r11109  
    11## this file contains the tasks for running the detrend stacking stage
     2## these tasks use the book detPendingStackedImfile
    23
    34if ($?network == 0)
     
    1920exec mkdir -p $LOGSUBDIR
    2021
    21 book init DetrendStackClass
     22book init detPendingStackedImfile
    2223
    2324macro detstack.status
    24   book listbook DetrendStackClass
     25  book listbook detPendingStackedImfile
    2526end
    2627
    2728# select images ready for detrend_stack.pl
    28 # new entries are added to DetrendStackClass
     29# new entries are added to detPendingStackedImfile
    2930# compare the new list with the ones already selected
    3031task           dettool.stack.load
     
    3536  periods      -timeout 30
    3637
    37   stdout $LOGSUBDIR/detstack.log
     38  stdout NULL
    3839  stderr $LOGSUBDIR/detstack.log
    3940
     
    4546  task.exit    0
    4647    # convert 'stdout' to book format
    47     ipptool2book stdout DetrendStackClass -key det_id:iteration:class_id -uniq
     48    ipptool2book stdout detPendingStackedImfile -key det_id:iteration:class_id -uniq
    4849    if ($VERBOSE > 2)
    49       book listbook DetrendStackClass
     50      book listbook detPendingStackedImfile
    5051    end
    5152
    5253    # delete existing entries which are DONE
    53     book delpage DetrendStackClass -key state DONE
     54    book delpage detPendingStackedImfile -key state DONE
    5455  end
    5556
     
    7273
    7374  task.exec
    74     book npages DetrendStackClass -var N
     75    book npages detPendingStackedImfile -var N
    7576    if ($N == 0) break
    7677    if ($network == 0) break
    7778   
    78     # look for new images in DetrendStackClass
    79     book getpage DetrendStackClass 0 -var pageName -key state NULL
     79    # look for new images in detPendingStackedImfile
     80    book getpage detPendingStackedImfile 0 -var pageName -key state NULL
    8081    if ($pageName == NULL) break
    8182
    82     book setword DetrendStackClass $pageName state RUN
    83     book getword DetrendStackClass $pageName det_id    -var DET_ID
    84     book getword DetrendStackClass $pageName iteration -var ITERATION
    85     book getword DetrendStackClass $pageName det_type  -var DET_TYPE
    86     book getword DetrendStackClass $pageName class_id  -var CLASS_ID
    87     book getword DetrendStackClass $pageName camera    -var CAMERA 
     83    book setword detPendingStackedImfile $pageName state RUN
     84    book getword detPendingStackedImfile $pageName det_id    -var DET_ID
     85    book getword detPendingStackedImfile $pageName iteration -var ITERATION
     86    book getword detPendingStackedImfile $pageName det_type  -var DET_TYPE
     87    book getword detPendingStackedImfile $pageName class_id  -var CLASS_ID
     88    book getword detPendingStackedImfile $pageName camera    -var CAMERA 
    8889
    8990    # specify choice of remote host:
     
    9596
    9697    # XXX add $WORKDIR/$LOG_DIR
     98    # XXX use ipp_filename.pl to lookup output file names
    9799    stdout $LOGSUBDIR/$CAMERA.$DET_TYPE.$DET_ID.$ITERATION.$CLASS_ID.log
    98100    stderr $LOGSUBDIR/$CAMERA.$DET_TYPE.$DET_ID.$ITERATION.$CLASS_ID.log
     
    108110  end
    109111
    110   # success
    111   task.exit 0
    112     book setword DetrendStackClass $options:0 state DONE
    113   end
    114 
    115112  # default exit status
    116113  task.exit    default
    117     showcommand failure
    118     book setword DetrendStackClass $options:0 state FAIL
     114    process_exit detPendingStackedImfile $options:0 $JOB_STATUS
    119115  end
    120116
     
    122118  task.exit    timeout
    123119    showcommand timeout
    124     book setword DetrendStackClass $options:0 state TIMEOUT
     120    book setword detPendingStackedImfile $options:0 state TIMEOUT
    125121  end
    126122end
Note: See TracChangeset for help on using the changeset viewer.