IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2008, 2:24:12 PM (18 years ago)
Author:
bills
Message:

require --run-state and some other minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/chip_imfile.pl

    r19397 r19560  
    4545
    4646pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    47 pod2usage( -msg => "Required options: --exp_id --chip_id --class_id --uri --camera --outroot",
     47pod2usage( -msg => "Required options: --exp_id --chip_id --class_id --uri --camera --outroot --run-state",
    4848           -exitval => 3) unless
    4949    defined $exp_id and
     
    5252    defined $uri and
    5353    defined $camera and
    54     defined $outroot;
    55 
    56 if (not defined $run_state) { $run_state = 'new'; }
     54    defined $outroot and
     55    defined $run_state;
    5756
    5857$ipprc->define_camera($camera);
    5958
    6059my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    61 $logDest .= "_update" if $run_state eq "update";
     60$logDest .= ".update" if $run_state eq "update";
    6261
    6362$ipprc->redirect_output($logDest) if $redirect;
     
    137136my $configuration = $ipprc->filename("PPIMAGE.CONFIG",      $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    138137
     138if ($run_state eq 'update') {
     139    $outputStats .= '.update';
     140    $traceDest .= '.update';
     141}
     142
    139143# Run ppImage
    140144unless ($no_op) {
     
    142146    ## XXX also stats: output should be implied by $outroot
    143147    my $command;
    144     my $do_stats = 1;
     148    my $do_stats;
    145149
    146150    if ($run_state eq "new") {
     
    151155        $command .= " -dumpconfig $configuration";
    152156        $command .= " -tracedest $traceDest -log $logDest";
     157        $do_stats = 1;
    153158    } else {
    154 
    155         $do_stats = 0; # XXX write stats to an alternate file and compare?
    156 
    157159        $command  = "$ppImage -file $uri $outroot";
    158160        $command .= " -ipprc $configuration";
    159161        $command .= " -threads $threads" if defined $threads;
    160162        $command .= " -dbname $dbname" if defined $dbname;
    161         $command .= " -tracedest ${traceDest}_update -log $logDest";
     163        $command .= " -tracedest $traceDest -log $logDest";
    162164        $command .= " -Db PPIMAGE:PHOTOM FALSE";
    163165    }
Note: See TracChangeset for help on using the changeset viewer.