Changeset 23702
- Timestamp:
- Apr 3, 2009, 11:01:48 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ippScripts/scripts/dist_component.pl (modified) (10 diffs)
-
ippTasks/dist.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_component.pl
r23693 r23702 27 27 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 28 28 use Pod::Usage qw( pod2usage ); 29 30 # Look for programs we need31 my $missing_tools;32 my $disttool = can_run('disttool') or (warn "Can't find disttool" and $missing_tools = 1);33 my $streaksrelease = can_run('streaksrelease') or (warn "Can't find streaksrelease" and $missing_tools = 1);34 if ($missing_tools) {35 warn("Can't find required tools.");36 exit($PS_EXIT_CONFIG_ERROR);37 }38 39 # Parse the command-line arguments40 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean);41 my ($outroot, $run_state, $data_state, $magicked);42 my ($dbname, $save_temps, $verbose, $no_update, $logfile);43 44 GetOptions(45 'dist_id=s' => \$dist_id, # distribution run identifier46 'camera=s' => \$camera, # camera for evaluating file rules47 'stage=s' => \$stage, # raw, chip, warp, or diff48 'stage_id=s' => \$stage_id, # exp_id, chip_id, warp_id, or diff_id49 'component=s' => \$component, # the class_id or skycell_id50 'path_base=s' => \$path_base, # path_base of the input51 'chip_path_base=s'=> \$chip_path_base, # path base for camera stage (to enable us to find the mask filefor raw images)52 'state=s' => \$run_state, # state of the run53 'data_state=s' => \$data_state, # data_state for this component54 'magicked' => \$magicked, # magicked state for this component55 'outroot=s' => \$outroot, # "directory" for outputs56 'clean' => \$clean, # create clean distribution57 'save-temps' => \$save_temps, # Save temporary files?58 'dbname=s' => \$dbname, # Database name59 'verbose' => \$verbose, # Print stuff?60 'no-update' => \$no_update, # Don't update the database?61 'logfile=s' => \$logfile,62 ) or pod2usage( 2 );63 64 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;65 pod2usage( -msg => "Required options: --dist_id --camera --stage --stage_id --component --path_base --outroot",66 -exitval => 3) unless67 defined $dist_id and68 defined $camera and69 defined $stage and70 defined $stage_id and71 defined $component and72 defined $path_base and73 defined $outroot;74 75 $ipprc->redirect_output($logfile) if $logfile;76 77 if (($stage eq 'raw') and !defined $chip_path_base) {78 pod2usage( -msg => "Required options: --chip_path_base for raw stage", -exitval => 3);79 }80 81 $ipprc->define_camera($camera);82 83 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files84 85 # making a clean bundle of raw images doesn't make sense86 if (($stage eq "raw") and $clean) {87 # well I suppose we could ship the registration log file. naw.88 &my_die("cannot create clean run at raw stage", $dist_id, $component, $PS_EXIT_CONFIG_ERROR);89 }90 91 # create the output directories if it is not a nebulous path and it doesn't exist92 if (index($outroot, "neb://") != 0) {93 if (! -e $outroot ) {94 my $code = system "mkdir -p $outroot";95 &my_die("cannot create output directory $outroot", $dist_id, $component,96 $code >> 8) if $code;97 }98 }99 100 my $file_list = get_file_list($stage, $component, $path_base);101 102 # we die in get_file_list if something goes wrong.103 # If the file list is empty it is an error because we should at least get a config dump file104 105 &my_die("empty file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if (!scalar keys %$file_list);106 107 # set up directory for temporary files108 109 my $tmpdir = "$outroot/tmpdir.$dist_id.$component.$$";110 if (-e $tmpdir) {111 if (-d $tmpdir) {112 my $rc = system "rm -r $tmpdir";113 &my_die("cannot rm $tmpdir return code: $rc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if $rc;114 } else {115 unlink $tmpdir or &my_die("cannot delete $tmpdir", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR);116 }117 }118 mkdir $tmpdir or &my_die("cannot create temporary directory $tmpdir", $dist_id, $component,119 $PS_EXIT_UNKNOWN_ERROR);120 121 # XXX get this from camera and a recipe file122 # or this with the quality flag123 my $need_to_nan_masked = !$clean && ($camera eq "GPC1");124 125 my ($image, $mask, $variance);126 127 my @base_list;128 foreach my $file_rule (keys %$file_list) {129 # if this is an image, mask, or variance image and we are building a clean distribution bundle,130 # skip it131 my $image_type = get_image_type($stage, $file_rule);132 next if $clean && $image_type;133 134 my $file_name = $file_list->{$file_rule};135 my $base = basename($file_name);136 my $path = $ipprc->file_resolve($file_name);137 138 &my_die("failed to resolve $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR) if !$path;139 140 # open the file to make sure it exists (and to work around the failed mount phenomena)141 my $fh = open_with_retries($file_name);142 close $fh;143 144 if ($image_type && $need_to_nan_masked) {145 # save the146 if ($image_type eq 'image') {147 $image = $path148 } elsif ($image_type eq 'mask') {149 $mask = $path;150 } elsif ($image_type eq 'variance') {151 $variance = $path;152 } else {153 &my_die("invalid image type found: $image_type", $dist_id, $component,154 $PS_EXIT_PROG_ERROR);155 }156 } else {157 # just symlink the existing file into the temporary directory158 symlink $path, "$tmpdir/$base";159 }160 push @base_list, $base;161 }162 163 my $run_streaksrelease;164 if ($need_to_nan_masked) {165 # make sure that the needed images exist.166 # XXX: they won't be found for a warp or diff with bad quality167 # we probably should be passing in the component's quality flag168 if (0) {169 if (($stage ne "warp") and ($stage ne "diff")) {170 &my_die("no image found", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$image;171 &my_die("no mask image found", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$mask;172 &my_die("no variance image found", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$variance;173 }174 }175 $run_streaksrelease = 1 if $image;176 }177 178 if ($run_streaksrelease) {179 # Here is where we determine whether or not a GPC1 image can be released.180 # XXX: actually the sql for disttool -pendingcomponent won't pass a component that181 # requires magic and hasn't been magicked, but we check again here182 # XXX: get this from a recipe183 184 if ($camera eq "GPC1" and !$magicked) {185 &my_die("cannot create distribution bundle ${stage}_id $stage_id because the data has not been magic desreaked", $dist_id, $component, $PS_EXIT_DATA_ERROR);186 }187 188 my $class_id;189 # run streaksrelease to set masked pixels to NAN190 if ($stage eq "raw") {191 $class_id = $component;192 # we can use the chip mask because disttool demands that magic have been run193 # and so the camera mask and the chip mask are the same194 $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $chip_path_base, $component);195 my $fh = open_with_retries($mask);196 close $fh;197 } elsif ($stage eq "chip") {198 $class_id = $component;199 }200 201 my $command = "$streaksrelease -stage $stage -image $image -outroot $tmpdir";202 $command .= " -class_id $class_id" if $class_id;203 $command .= " -mask $mask" if $mask;204 $command .= " -chip_mask $mask" if ($stage eq 'chip' and $mask);205 $command .= " -weight $variance" if $variance;206 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =207 run(command => $command, verbose => $verbose);208 unless ($success) {209 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);210 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code);211 }212 }213 214 215 my $file_name;216 my $bytes;217 my $md5sum;218 # create the tarfile219 {220 # XXX TODO: create a file rule for the tar file name221 my $tbase = basename($path_base);222 $tbase .= ".$component" if $component;223 $file_name = "$tbase.tgz";224 my $tarfile = "$outroot/$file_name";225 226 my $command = "tar -C $tmpdir -czhf $tarfile .";227 228 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =229 run(command => $command, verbose => $verbose);230 unless ($success) {231 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);232 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code);233 }234 235 # tell the module not to die on error236 $Digest::MD5::File::NOFATALS = 1;237 $md5sum = file_md5_hex($tarfile);238 &my_die("unable to compute md5sum for $tarfile", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if !$md5sum;239 240 my @finfo = stat($tarfile);241 &my_die("unable to stat $tarfile", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if !@finfo;242 $bytes = $finfo[7];243 244 delete_tmpdir($tmpdir);245 }246 {247 my $command = "$disttool -addprocessedcomponent -dist_id $dist_id -component $component";248 $command .= " -name $file_name -bytes $bytes -md5sum $md5sum";249 $command .= " -dbname $dbname" if defined $dbname;250 251 unless (defined $no_update) {252 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =253 run(command => $command, verbose => $verbose);254 unless ($success) {255 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);256 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code);257 }258 } else {259 print "skipping command $command\n";260 }261 }262 263 exit 0;264 265 ### Pau.266 29 267 30 # filerules that are not included in 'cleaned' distribution bundles … … 283 46 'PPSTACK.OUTPUT.VARIANCE' => 'variance' ); 284 47 48 49 # Look for programs we need 50 my $missing_tools; 51 my $disttool = can_run('disttool') or (warn "Can't find disttool" and $missing_tools = 1); 52 my $streaksrelease = can_run('streaksrelease') or (warn "Can't find streaksrelease" and $missing_tools = 1); 53 if ($missing_tools) { 54 warn("Can't find required tools."); 55 exit($PS_EXIT_CONFIG_ERROR); 56 } 57 58 # Parse the command-line arguments 59 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean); 60 my ($outroot, $run_state, $data_state, $magicked, $no_magic, $no_images); 61 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 62 63 GetOptions( 64 'dist_id=s' => \$dist_id, # distribution run identifier 65 'camera=s' => \$camera, # camera for evaluating file rules 66 'stage=s' => \$stage, # raw, chip, warp, or diff 67 'stage_id=s' => \$stage_id, # exp_id, chip_id, warp_id, or diff_id 68 'component=s' => \$component, # the class_id or skycell_id 69 'path_base=s' => \$path_base, # path_base of the input 70 'chip_path_base=s'=> \$chip_path_base, # path base for camera stage (to enable us to find the mask filefor raw images) 71 'state=s' => \$run_state, # state of the run 72 'data_state=s' => \$data_state, # data_state for this component 73 'no_images' => \$no_images, # the processing for this component did not produced images 74 'no_magic' => \$no_magic, # magic is not required for this distribution run 75 'magicked' => \$magicked, # magicked state for this component 76 'outroot=s' => \$outroot, # "directory" for outputs 77 'clean' => \$clean, # create clean distribution 78 'save-temps' => \$save_temps, # Save temporary files? 79 'dbname=s' => \$dbname, # Database name 80 'verbose' => \$verbose, # Print stuff? 81 'no-update' => \$no_update, # Don't update the database? 82 'logfile=s' => \$logfile, 83 ) or pod2usage( 2 ); 84 85 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 86 pod2usage( -msg => "Required options: --dist_id --camera --stage --stage_id --component --path_base --outroot", 87 -exitval => 3) unless 88 defined $dist_id and 89 defined $camera and 90 defined $stage and 91 defined $stage_id and 92 defined $component and 93 defined $path_base and 94 defined $outroot; 95 96 $ipprc->redirect_output($logfile) if $logfile; 97 98 if (($stage eq 'raw') and !defined $chip_path_base) { 99 pod2usage( -msg => "Required options: --chip_path_base for raw stage", -exitval => 3); 100 } 101 102 $ipprc->define_camera($camera); 103 104 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 105 106 # making a clean bundle of raw images doesn't make sense 107 if (($stage eq "raw") and $clean) { 108 # well I suppose we could ship the registration log file. naw. 109 &my_die("cannot create clean run at raw stage", $dist_id, $component, $PS_EXIT_CONFIG_ERROR); 110 } 111 112 # create the output directories if it is not a nebulous path and it doesn't exist 113 if (index($outroot, "neb://") != 0) { 114 if (! -e $outroot ) { 115 my $code = system "mkdir -p $outroot"; 116 &my_die("cannot create output directory $outroot", $dist_id, $component, 117 $code >> 8) if $code; 118 } 119 } 120 121 # Get the list of data products for this component 122 # note: We my_die in get_file_list if something goes wrong. 123 my $file_list = get_file_list($stage, $component, $path_base); 124 125 # If the file list is empty it is an error because we should at least get a config dump file 126 # XXX: is this true? what about fake? 127 128 &my_die("empty file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if (!scalar keys %$file_list); 129 130 # set up directory for temporary files 131 132 my $tmpdir = "$outroot/tmpdir.$dist_id.$component"; 133 if (-e $tmpdir) { 134 if (-d $tmpdir) { 135 my $rc = system "rm -r $tmpdir"; 136 &my_die("cannot rm $tmpdir return code: $rc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if $rc; 137 } else { 138 unlink $tmpdir or &my_die("cannot delete $tmpdir", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR); 139 } 140 } 141 mkdir $tmpdir or &my_die("cannot create temporary directory $tmpdir", $dist_id, $component, 142 $PS_EXIT_UNKNOWN_ERROR); 143 144 # 145 # we need to run set masked pixels to NAN in the image and variance images 146 # unless 147 # 1. we are building a clean distribution bundle 148 # 2. magic is not required for this distRun 149 # 3. the processing for the component produced no images (warp or diff with bad quality for example) 150 my $nan_masked_pixels = ! ($clean || $no_magic || $no_images); 151 152 my ($image, $mask, $variance); 153 154 my @base_list; 155 foreach my $file_rule (keys %$file_list) { 156 # check whether this file rule refers to an image, mask, or variance fits image 157 my $image_type = get_image_type($stage, $file_rule); 158 159 # if we are building a clean bundle skip this rule 160 next if $clean && $image_type; 161 162 my $file_name = $file_list->{$file_rule}; 163 my $base = basename($file_name); 164 my $path = $ipprc->file_resolve($file_name); 165 166 &my_die("failed to resolve $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR) if !$path; 167 168 # open the file to make sure it exists (and to work around the failed mount phenomena) 169 my $fh = open_with_retries($path); 170 close $fh; 171 172 # we need to pre-process the image before adding to the bundle. Save the path names. 173 if ($image_type && $nan_masked_pixels) { 174 # save the 175 if ($image_type eq 'image') { 176 $image = $path 177 } elsif ($image_type eq 'mask') { 178 $mask = $path; 179 } elsif ($image_type eq 'variance') { 180 $variance = $path; 181 } else { 182 &my_die("invalid image type found: $image_type", $dist_id, $component, 183 $PS_EXIT_PROG_ERROR); 184 } 185 } else { 186 # create a symbolic link from the file in the nebulous repositorythe into the temporary directory 187 symlink $path, "$tmpdir/$base"; 188 } 189 push @base_list, $base; 190 } 191 192 if ($nan_masked_pixels) { 193 # One last check as to whether magic has been applied to the inputs 194 195 # Note: the sql for disttool -pendingcomponent won't select a component that 196 # requires magic and hasn't been magicked, but we check again here 197 198 if (!($magicked or $no_magic)) { 199 &my_die("cannot create distribution bundle ${stage}_id $stage_id because the data has not been magic desreaked", $dist_id, $component, $PS_EXIT_DATA_ERROR); 200 } 201 202 &my_die("no image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$image; 203 &my_die("no mask image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$mask; 204 &my_die("no variance image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 205 206 207 my $class_id; 208 # run streaksrelease to set masked pixels to NAN 209 if ($stage eq "raw") { 210 $class_id = $component; 211 # we can use the chip mask because disttool demands that magic have been run 212 # and so the camera mask and the chip mask are the same 213 $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $chip_path_base, $component); 214 my $fh = open_with_retries($mask); 215 close $fh; 216 } elsif ($stage eq "chip") { 217 $class_id = $component; 218 } 219 220 my $command = "$streaksrelease -stage $stage -image $image -outroot $tmpdir"; 221 $command .= " -class_id $class_id" if $class_id; 222 $command .= " -mask $mask" if $mask; 223 $command .= " -chip_mask $mask" if ($stage eq 'chip' and $mask); 224 $command .= " -weight $variance" if $variance; 225 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 226 run(command => $command, verbose => $verbose); 227 unless ($success) { 228 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 229 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code); 230 } 231 } 232 233 234 my $file_name; 235 my $bytes; 236 my $md5sum; 237 # create the tarfile 238 { 239 # XXX TODO: create a file rule for the tar file name 240 my $tbase = basename($path_base); 241 $tbase .= ".$component" if $component; 242 $file_name = "$tbase.tgz"; 243 my $tarfile = "$outroot/$file_name"; 244 245 my $command = "tar -C $tmpdir --owner=ipp --group=users -czhf $tarfile ."; 246 247 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 248 run(command => $command, verbose => $verbose); 249 unless ($success) { 250 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 251 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code); 252 } 253 254 # tell the module not to die on error 255 $Digest::MD5::File::NOFATALS = 1; 256 $md5sum = file_md5_hex($tarfile); 257 &my_die("unable to compute md5sum for $tarfile", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if !$md5sum; 258 259 my @finfo = stat($tarfile); 260 &my_die("unable to stat $tarfile", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR) if !@finfo; 261 $bytes = $finfo[7]; 262 263 delete_tmpdir($tmpdir); 264 } 265 { 266 my $command = "$disttool -addprocessedcomponent -dist_id $dist_id -component $component"; 267 $command .= " -name $file_name -bytes $bytes -md5sum $md5sum"; 268 $command .= " -dbname $dbname" if defined $dbname; 269 270 unless (defined $no_update) { 271 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 272 run(command => $command, verbose => $verbose); 273 unless ($success) { 274 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 275 &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code); 276 } 277 } else { 278 print "skipping command $command\n"; 279 } 280 } 281 282 exit 0; 283 284 ### Pau. 285 285 286 # return the image type (image, mask, or variance) if this file rule refers to 286 287 # one of the big fits files that are not included in a clean distribution … … 340 341 my %file_list; 341 342 if ($stage eq "raw") { 342 # XXX: TODO for now path_base is set to the uri of the file 343 # eventually we'll have a path_base that we'll need to resolve 343 # XXX: TODO for now disttool sets path_base is set to the uri of the file 344 # eventually rawImfile will have a path_base that we'll need to add '.fits' 345 # XXX do we want to distribute the registration log files? 344 346 $file_list{"RAW.IMAGE"} = $path_base; 345 347 return \%file_list; … … 402 404 $PS_EXIT_CONFIG_ERROR) if (!$val); 403 405 404 $file_list{ key} = $val;406 $file_list{$key} = $val; 405 407 } 406 408 close $in; … … 511 513 STAGE STR RAW 512 514 # there is isn't really a file rule for raw images 513 DUMMYBOOL F515 RAW.IMAGE BOOL F 514 516 END 515 517 … … 518 520 STAGE STR CHIP 519 521 PPIMAGE.CONFIG BOOL T 520 #PPIMAGE.CHIP BOOL F521 #PPIMAGE.CHIP.MASK BOOL F522 #PPIMAGE.CHIP.VARIANCE BOOL F522 PPIMAGE.CHIP BOOL F 523 PPIMAGE.CHIP.MASK BOOL F 524 PPIMAGE.CHIP.VARIANCE BOOL F 523 525 PPIMAGE.BIN1 BOOL T 524 526 PPIMAGE.BIN2 BOOL T … … 544 546 PROD_LIST METADATA 545 547 STAGE STR CAM_CHIP 546 #PSASTRO.OUTPUT.MASK BOOL F548 PSASTRO.OUTPUT.MASK BOOL F 547 549 END 548 550 PROD_LIST METADATA 549 551 STAGE STR FAKE 550 #PPSIM.OUTPUT BOOL F552 PPSIM.OUTPUT BOOL F 551 553 END 552 554 # list of data products for a gpc1 warpSkyfile (pswarp) … … 554 556 STAGE STR WARP 555 557 PSWARP.CONFIG BOOL T 556 #PSWARP.OUTPUT BOOL F557 #PSWARP.OUTPUT.MASK BOOL F558 #PSWARP.OUTPUT.VARIANCE BOOL F558 PSWARP.OUTPUT BOOL F 559 PSWARP.OUTPUT.MASK BOOL F 560 PSWARP.OUTPUT.VARIANCE BOOL F 559 561 PSWARP.OUTPUT.SOURCES BOOL T 560 562 PSPHOT.BACKMDL.MEF BOOL T … … 569 571 STAGE STR DIFF 570 572 PPSUB.CONFIG BOOL T 571 #PPSUB.OUTPUT BOOL F572 #PPSUB.OUTPUT.MASK BOOL F573 #PPSUB.OUTPUT.VARIANCE BOOL F573 PPSUB.OUTPUT BOOL F 574 PPSUB.OUTPUT.MASK BOOL F 575 PPSUB.OUTPUT.VARIANCE BOOL F 574 576 PPSUB.OUTPUT.KERNELS BOOL T 575 577 PPSUB.OUTPUT.JPEG1 BOOL T … … 584 586 STAGE STR STACK 585 587 PPSTACK.CONFIG BOOL T 586 #PPSTACK.OUTPUT BOOL F587 #PPSTACK.OUTPUT.MASK BOOL F588 #PPSTACK.OUTPUT.VARIANCE BOOL F588 PPSTACK.OUTPUT BOOL F 589 PPSTACK.OUTPUT.MASK BOOL F 590 PPSTACK.OUTPUT.VARIANCE BOOL F 589 591 PPSTACK.TARGET.PSF BOOL T 590 592 PSPHOT.OUT.CMF.MEF BOOL T -
trunk/ippTasks/dist.pro
r23662 r23702 131 131 book getword distToProcess $pageName state -var STATE 132 132 book getword distToProcess $pageName data_state -var DATA_STATE 133 book getword distToProcess $pageName no_magic -var NO_MAGIC 133 134 book getword distToProcess $pageName magicked -var MAGICKED 134 135 book getword distToProcess $pageName outroot -var OUTROOT 135 136 book getword distToProcess $pageName dbname -var DBNAME 137 138 $EXTRA_FLAGS = "" 136 139 if ("$CLEAN" == "T") 137 $CLEAN_ARG = "--clean" 138 else 139 $CLEAN_ARG = "" 140 $EXTRA_FLAGS = --clean 140 141 end 141 142 # magicked is output as integer due to the union in the sql 142 143 if ($MAGICKED) 143 $MAGICKED_ARG = "--magicked" 144 else 145 $MAGICKED_ARG = "" 144 $EXTRA_FLAGS = $EXTRA_FLAGS --magicked 145 end 146 # no_magic is output as integer due to the union in the sql 147 if ($NO_MAGIC) 148 $EXTRA_FLAGS = $EXTRA_FLAGS --no_magic 146 149 end 147 150 … … 151 154 152 155 sprintf logfile "%s/dist.%s.%s.log" $OUTROOT $DIST_ID $COMPONENT 153 154 $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $MAGICKED_ARG $CLEAN_ARG --outroot $OUTROOT --logfile $logfile 156 stdout $logfile 157 stderr $logfile 158 159 $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_FLAGS --outroot $OUTROOT --logfile $logfile 155 160 156 161 add_standard_args run … … 251 256 252 257 sprintf logfile "%s/dist.advance.%s.log" $OUTROOT $DIST_ID 258 stdout $logfile 259 stderr $logfile 253 260 254 261 $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outroot $OUTROOT --logfile $logfile
Note:
See TracChangeset
for help on using the changeset viewer.
