IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 10, 2008, 8:46:59 AM (18 years ago)
Author:
bills
Message:

Resolve log file and redirect output in scripts not in tasks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/detrend.correct.pro

    r17699 r18048  
    55# test for required global variables
    66check.globals
    7 
    8 $LOGSUBDIR = $LOGDIR/detrend
    9 exec mkdir -p $LOGSUBDIR
    107
    118book init detPendingCorrectedImfile
     
    7168
    7269  stdout NULL
    73   stderr $LOGSUBDIR/detcorr.imfile.log
     70  stderr $LOGDIR/detcorr.load.log
    7471
    7572  task.exec
     
    146143    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
    147144
    148     $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    149     if ("$logfile" == "")
    150       echo "WARNING: logfile not defined in detrend.correct.pro:150"
    151       break
    152     end
    153 
    154     stdout $logfile
    155     stderr $logfile
    156     dirname $logfile -var outpath
    157 
    158     # XXX I need to report the error if this fails...
    159     mkdir $outpath
    160 
    161     $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
     145    stdout $LOGDIR/detcorr.run.log
     146    stderr $LOGDIR/detcorr.run.log
     147
     148    $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --outroot $outroot --redirect-output
    162149    if ("$WORKDIR" != "NULL")
    163150      $run = $run --workdir $WORKDIR
     
    202189
    203190  stdout NULL
    204   stderr $LOGSUBDIR/detcorr.exp.log
     191  stderr $LOGDIR/detcorr.exp.load.log
    205192
    206193  task.exec
     
    275262    sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
    276263
    277     ## generate output log based on filerule (convert the URI to a PATH)
    278     $logfile = `ipp_filename.pl --touch --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
    279     if ("$logfile" == "")
    280       $logfile = $outroot.log
    281     end
    282 
    283     stdout $logfile
    284     stderr $logfile
    285     dirname $logfile -var outpath
    286     mkdir $outpath
    287 
    288     $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
     264    stdout $LOGDIR/detcorr.exp.run.log
     265    stderr $LOGDIR/detcorr.exp.run.log
     266
     267    $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --redirect-output
     268
    289269    if ("$WORKDIR" != "NULL")
    290270      $run = $run --workdir $WORKDIR
Note: See TracChangeset for help on using the changeset viewer.