Changeset 33054 for trunk/ippScripts/scripts/background_chip.pl
- Timestamp:
- Jan 9, 2012, 1:47:47 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/background_chip.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/background_chip.pl
r28536 r33054 42 42 # Parse the command-line arguments 43 43 my ( $chip_bg_id, $class_id, $camera, $outroot, $dbname, $reduction, $verbose, 44 $threads, $no_update, $save_temps, $no_op, $redirect, $ deburned );44 $threads, $no_update, $save_temps, $no_op, $redirect, $chip_path_base, $magicked ); 45 45 GetOptions( 46 46 'chip_bg_id=s' => \$chip_bg_id, # chipBackgroundRun identifier … … 51 51 'reduction=s' => \$reduction, # Reduction class 52 52 'threads=s' => \$threads, # Number of threads to use 53 'chip_path_base=s' => \$chip_path_base, # optional chip_path_base 54 'magicked=s' => \$magicked, # magicked status of input 53 55 'verbose' => \$verbose, # Print to stdout 54 56 'no-update' => \$no_update, # Don't update the database? … … 88 90 # Get inputs 89 91 my $in_path; # Input path 90 my $magicked; # Input is magicked? 91 { 92 my $do_stats; 93 my $dump_config; 94 if ($chip_path_base and $no_update) { 95 # we are running outside of a chip_bg_run (perhaps by the postage stamp server) don't dump config 96 # or do stats. Get path to input from command line. 97 $in_path = $chip_path_base; 98 $magicked = 0 if !defined $magicked; 99 $do_stats = 0; 100 $dump_config = 0; 101 } else { 102 # normal operation. Get input parameters from the database 103 $do_stats = 1; 104 $dump_config = 1; 92 105 my $command = "bgtool -chipinputs -chip_bg_id $chip_bg_id -class_id $class_id"; 93 106 $command .= " -dbname $dbname" if defined $dbname; … … 153 166 $command .= " -image $in_image"; 154 167 $command .= " -mask $in_mask"; 155 $command .= " -stats $out_stats" ;168 $command .= " -stats $out_stats" if $do_stats; 156 169 $command .= " -background $in_bg" if $apply_bg; 157 170 $command .= " -pattern $in_pattern" if $apply_pattern; 158 171 $command .= " -recipe PPBACKGROUND $recipe_ppBackground"; 159 $command .= " -recipe PPSTATS CHIPSTATS" ;172 $command .= " -recipe PPSTATS CHIPSTATS" if $do_stats; 160 173 $command .= " -dbname $dbname" if defined $dbname; 161 $command .= " -dumpconfig $out_config" ;174 $command .= " -dumpconfig $out_config" if $dump_config; 162 175 $command .= " -tracedest $traceDest -log $logDest"; 163 176 … … 171 184 172 185 # Gather command-line arguments from statistics 173 my $cmdflags ;# Command-line flags to add174 my $quality ; # Quality flag175 {186 my $cmdflags = ""; # Command-line flags to add 187 my $quality = 0; # Quality flag 188 if ($do_stats) { 176 189 &my_die("Couldn't find expected output file: $out_stats", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_stats); 177 190 … … 191 204 192 205 if (!$quality and !$no_op) { 193 &my_die("Couldn't find expected output file: $out_ stats", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_image);194 &my_die("Couldn't find expected output file: $out_ stats", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_mask);195 &my_die("Couldn't find expected output file: $out_ stats", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless$ipprc->file_exists($out_config);206 &my_die("Couldn't find expected output file: $out_image", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_image); 207 &my_die("Couldn't find expected output file: $out_mask", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_mask); 208 &my_die("Couldn't find expected output file: $out_config", $chip_bg_id, $class_id, $PS_EXIT_SYS_ERROR) unless !$dump_config or $ipprc->file_exists($out_config); 196 209 197 210 }
Note:
See TracChangeset
for help on using the changeset viewer.
