Changeset 42394 for trunk/ippScripts/scripts/ipp_apply_burntool_fix.pl
- Timestamp:
- Feb 14, 2023, 12:59:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_apply_burntool_fix.pl
r37313 r42394 15 15 my $missing_tools; 16 16 my $regtool = can_run('regtool') or (warn "Can't find regtool" and $missing_tools = 1); 17 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 17 18 my $burntool = can_run('ipp_apply_burntool_single.pl') or (warn "Can't find ipp_burntool_apply_single.pl" and $missing_tools = 1); 18 19 if ($missing_tools) { … … 65 66 die "failed to find uri in regtool output" unless $uri; 66 67 68 # Determine the value of a "good" burntool run. 69 my $config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD"; 70 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 71 run ( command => $config_cmd, verbose => $verbose); 72 unless ($success) { 73 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 74 carp("Unable to perform ppConfigDUmp $command: $error_code"); 75 exit $error_code; 76 } 77 78 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or die("Unable to parse Config metadata"); 79 80 my $burntoolStateGood = 999; 81 foreach my $cfg (@$recipeData) { 82 if ($cfg->{name} eq 'BURNTOOL.STATE.GOOD') { 83 $burntoolStateGood = $cfg->{value}; 84 } 85 } 86 if ($burntoolStateGood == 999) { 87 die("Failed to determine BURNTOOL.STATE.GOOD"); 88 } 89 90 67 91 # Construct burntool table name 68 92 my $table; 69 ($table = $uri) =~ s/\.fits/\.burn\.tbl/; 93 if($burntoolStateGood == 15) { 94 ($table = $uri) =~ s/\.fits/\.burn\.v15\.tbl/; 95 } else { 96 ($table = $uri) =~ s/\.fits/\.burn\.tbl/; 97 } 98 70 99 print "$table\n"; 71 100
Note:
See TracChangeset
for help on using the changeset viewer.
