IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2008, 9:52:57 AM (18 years ago)
Author:
Paul Price
Message:

Adding outroot instead of workdir for chip and camera; adding verbose flags.

File:
1 edited

Legend:

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

    r15481 r16336  
    1313
    1414my ($dbname,                    # Database name to use
     15    $workdir_default,           # Default working directory
     16    $verbose,                   # Verbose operations?
    1517    $no_op,                     # No operations?
    1618    $no_update,                 # No updating?
    1719    );
    1820GetOptions(
    19            'dbname|d=s' => \$dbname,
     21           'dbname=s' => \$dbname,
     22           'workdir=s' => \$workdir_default,
     23           'verbose' => \$verbose,
    2024           'no-op' => \$no_op,
    2125           'no-update' => \$no_update,
    2226) or pod2usage( 2 );
    2327
    24 pod2usage(
    25           -msg => "Required options: --dbname",
    26           -exitval => 3,
    27           ) unless defined $dbname;
     28pod2usage( -msg => "Required options: --dbname --workdir",
     29           -exitval => 3,
     30           ) unless
     31    defined $dbname;
     32
     33$workdir_default = `pwd` unless defined $workdir_default;
    2834
    2935my $mdcParser = PS::IPP::Metadata::Config->new; # Metadata config parser
     
    3541die "Can't find required tools.\n" if $missing_tools;
    3642
    37 # Phase 2 imfile processing
     43# Imfile processing
    3844my @whole;                      # The whole list for processing
    3945{
     
    6571            my $reduction = $item->{reduction};
    6672            my $workdir = $item->{workdir};
    67            
    68             my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera";
     73            $workdir = $workdir_default unless (defined $workdir or $workdir ne "NULL");
     74
     75            my $outroot = $workdir . '/' . ${exp_tag} . '/' . ${exp_tag} . '.ch.' . ${chip_id};
     76
     77            my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera --outroot $outroot";
    6978            $command .= " --reduction $reduction" if defined $reduction;
     79            $command .= " --verbose" if defined $verbose;
    7080            $command .= " --no-op" if defined $no_op;
    7181            $command .= " --no-update" if defined $no_update;
    72             $command .= " --workdir $workdir" if defined $workdir and $workdir ne "NULL";
    7382            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    7483                run( command => $command, verbose => 1 );
Note: See TracChangeset for help on using the changeset viewer.