Changeset 22430 for trunk/ippScripts/scripts/detrend_stack.pl
- Timestamp:
- Feb 24, 2009, 12:00:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_stack.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_stack.pl
r21371 r22430 23 23 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 24 24 use Pod::Usage qw( pod2usage ); 25 26 # Look for programs we need 27 my $missing_tools; 28 my $dettool = can_run('dettool') or (warn "Can't find dettool" and $missing_tools = 1); 29 my $ppMerge = can_run('ppMerge') or (warn "Can't find ppMerge" and $missing_tools = 1); 30 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 31 if ($missing_tools) { 32 warn("Can't find required tools."); 33 exit($PS_EXIT_CONFIG_ERROR); 34 } 25 35 26 36 my ( $det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $threads, $verbose, $save_temps, … … 59 69 or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); 60 70 71 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 72 $SIG{__DIE__} = sub { die @_ if $^S; 73 my_die( $_[0], $det_id, $iter, $class_id, $PS_EXIT_UNKNOWN_ERROR ); }; 74 61 75 # optionally redirect the outputs from this script to LOG.IMFILE 62 76 $ipprc->redirect_output($logDest) if $redirect; … … 65 79 $reduction = "DETREND" unless defined $reduction; 66 80 my $recipe = $ipprc->reduction($reduction, $det_type . '_STACK'); # Recipe name to use 67 68 # Look for programs we need69 my $missing_tools;70 my $dettool = can_run('dettool') or (warn "Can't find dettool" and $missing_tools = 1);71 my $ppMerge = can_run('ppMerge') or (warn "Can't find ppMerge" and $missing_tools = 1);72 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);73 if ($missing_tools) {74 warn("Can't find required tools.");75 exit($PS_EXIT_CONFIG_ERROR);76 }77 81 78 82 # The output file rule name depends on the detrend type … … 219 223 } 220 224 foreach my $line (@$stdout_buf) { 221 $cmdflags .= " $line";225 $cmdflags .= " $line"; 222 226 } 223 227 chomp $cmdflags; … … 261 265 $command .= " -iteration $iter"; 262 266 $command .= " -class_id $class_id"; 263 # XXX EAM : we should add this to the db : $command .= " -path_base $outroot";267 # XXX EAM : we should add this to the db : $command .= " -path_base $outroot"; 264 268 $command .= " -code $exit_code"; 265 269 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
