IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 8, 2010, 7:21:36 PM (16 years ago)
Author:
watersc1
Message:

rtbt works in test case up through auto-chip-queue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20101203/ippScripts/scripts/register_imfile.pl

    r29909 r29982  
    1919use File::Basename qw( basename);
    2020use IPC::Run;
    21 use IPC::Cmd 0.36 qw( can_run );
     21use IPC::Cmd 0.36 qw( can_run run );
    2222use PS::IPP::Config 1.01 qw( :standard );
     23use PS::IPP::Metadata::List qw( parse_md_list );
    2324use PS::IPP::Metadata::Config;
    2425use Math::Trig;
     
    179180$command .= " $cmdflags";
    180181
     182print "$command\n";
    181183# determine solar-system parameters
    182184my $longitude = &value_for_flag($cmdflags, 0.0, "-longitude");
     
    235237
    236238{
     239    my $mdcParser  = PS::IPP::Metadata::Config->new;
     240
     241    my $class_id   = &value_for_flag($cmdflags, 0.0, "-class_id");
     242    my $check_date       = &value_for_flag($cmdflags, 0.0, "-dateobs");
     243    $check_date =~ s/T.*$//;
     244    my $exp_name   = $tmp_exp_name;
     245   
     246
    237247    my $bt_check_command = "$regtool -checkburntoolimfile ";
    238     $bt_check_command = " -class_id $class_id ";
    239     $bt_check_command = " -date $date ";
    240     $bt_check_command = " -exp_name $exp_name ";
    241     $bt_check_command = " -dbname $dbname" if defined $dbname;
    242 
    243     ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     248    $bt_check_command .= " -class_id $class_id ";
     249    $bt_check_command .= " -date $check_date ";
     250    $bt_check_command .= " -valid_burntool $burntoolStateGood ";
     251    $bt_check_command .= " -exp_name $exp_name ";
     252    $bt_check_command .= " -dbname $dbname" if defined $dbname;
     253
     254    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    244255        run ( command => $bt_check_command, verbose => $verbose);
    245256    unless ($success) {
     
    270281   
    271282    my $regtool_update = "$regtool -updateprocessedimfile ";
    272     $regtool_update .= "-dbname $dbname" if defined $dbname;
     283    $regtool_update .= "-dbname $dbname " if defined $dbname;
    273284    $regtool_update .= "-exp_id $exp_id -class_id $class_id ";
    274285
    275286    my $burntool_data = pop(@{ $exposures });
    276287    if ($burntool_data->{burnable} == 0) {
    277         $regtool_update .= " -burntool_state 0 -data_state pending_burntool ";
     288        $regtool_update .= " -burntool_state 0 -set_state pending_burntool ";
    278289    }
    279290    else {
    280291        my $apply_command = "$ippApplyBurntoolSingle --dbname $dbname ";
    281292        $apply_command .= " --class_id $class_id --exp_id $exp_id ";
    282         $apply_command .= " --this_uri $burntool_data->{this_uri} ";
     293        $apply_command .= " --this_uri $burntool_data->{uri} ";
    283294        $apply_command .= " --previous_uri $burntool_data->{previous_uri} " if defined $burntool_data->{previous_uri};
    284295        $apply_command .= " --imfile_state $burntool_data->{imfile_state} ";
    285296        $apply_command .= " --verbose " if $verbose;
     297        print "$apply_command\n";
    286298        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    287299            IPC::Cmd::run(command => $apply_command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.