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/ippScripts/scripts/detrend_correct_imfile.pl

    r17671 r18048  
    2525
    2626my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction,
    27      $verbose, $no_update, $no_op );
     27     $verbose, $no_update, $no_op, $outroot, $redirect, $corr_id, $corr_type, $corr_uri );
    2828GetOptions(
    2929    'det_id|d=s'        => \$det_id,
     
    4141    'no-update'         => \$no_update,
    4242    'no-op'             => \$no_op,
     43    'outroot'           => \$outroot,
     44    'redirect-output'   => \$redirect,
    4345) or pod2usage( 2 );
    4446
     
    5658# XXX this exits with status = 0 on failure
    5759$ipprc->define_camera($camera);
     60
     61if ($redirect) {
     62    die "must suplly --outroot with --redirect-output" if !defined ($outroot);
     63    my $logDest     = $ipprc->filename("LOG.IMFILE", $outroot, $class_id)
     64       or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     65    $ipprc->redirect_output($logDest);
     66}
    5867
    5968# Recipes to use as a function of detrend type
Note: See TracChangeset for help on using the changeset viewer.