IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2023, 12:59:01 PM (3 years ago)
Author:
tdeboer
Message:

burntool handling/parsing updates

File:
1 edited

Legend:

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

    r40823 r42394  
    7575my $file_cmd   = can_run('file') or (warn "can't find program file" and $missing_tools = 1);
    7676my $zcat   = can_run('zcat') or (warn "can't find program zcat" and $missing_tools = 1);
     77my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    7778if ($missing_tools) {
    7879    warn("Can't find required tools.");
     
    131132}
    132133
     134# Determine the value of a "good" burntool run.
     135my $config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD";
     136my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     137    run ( command => $config_cmd, verbose => $verbose);
     138unless ($success) {
     139    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     140    &my_die("Unable to perform ppConfigDump: $error_code", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
     141}
     142
     143my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     144    &my_die("Unable to parse metadata config doc", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
     145
     146my $burntoolStateGood = 999;
     147foreach my $cfg (@$recipeData) {
     148    if ($cfg->{name} eq 'BURNTOOL.STATE.GOOD') {
     149        $burntoolStateGood = $cfg->{value};
     150    }
     151}
     152if ($burntoolStateGood == 999) {
     153    &my_die("Failed to determine BURNTOOL.STATE.GOOD", $burntoolStateGood, $class_id, 0, $PS_EXIT_SYS_ERROR);
     154}
     155
     156
    133157$ipprc->redirect_output($logfile) if $logfile;
    134158
     
    144168# note: We my_die in get_file_list if something goes wrong.
    145169
    146 my $file_list = get_file_list($stage, $component, $path_base, $clean, $num_sky_inputs);
     170my $file_list = get_file_list($stage, $component, $path_base, $clean, $num_sky_inputs,$burntoolStateGood);
    147171
    148172if (($stage ne 'raw') and ($stage ne 'fake') and ($stage ne 'stack_summary') and !$poor_quality) {
     
    555579    my $clean = shift;
    556580    my $num_sky_inputs = shift;
     581    my $bt_state_good = shift;
    557582
    558583    my @file_list;
     
    576601                my %burntool_table;
    577602                $burntool_table{file_rule} = "BURNTOOL.TABLE";
    578                 $burntool_table{name} = "$path_base.burn.tbl";
     603               
     604                if($bt_state_good == 15) {
     605                    $burntool_table{name} = "$path_base.burn.v15.tbl"; 
     606                } else {
     607                    $burntool_table{name} = "$path_base.burn.tbl";             
     608                }               
    579609                push @file_list, \%burntool_table;
    580610            }
Note: See TracChangeset for help on using the changeset viewer.