Changeset 27994
- Timestamp:
- May 18, 2010, 11:10:30 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r27991 r27994 170 170 171 171 # The subroutine lookup handles byexp, byid, and byskycell lookups including lookups that are 172 # triggered by a bydiff request 173 174 sub lookup 175 { 172 # triggered by a bydiff or bycoord request 173 174 sub lookup { 176 175 my $ipprc = shift; 177 176 my $rowList = shift; … … 207 206 my $class_id; 208 207 my $skycell_id; 208 my $default_error = $PSTAMP_NO_IMAGE_MATCH; 209 209 210 210 # note $magic_arg may be cleared below depending on $req_type … … 533 533 if (($img_type ne "diff") and ($img_type ne "stack")) { 534 534 print STDERR "lookup_diff: cannot lookup IMG_TYPE $img_type bydiff from a stack stack diff run\n"; 535 next; 535 setErrorCodes($rowList, $PSTAMP_INVALID_REQUEST); 536 # all images will be the same so we can stop 537 last; 536 538 } 537 539 # stack-stack diff … … 601 603 } else { 602 604 # XXX this will only happen if the minuend is not a warp. See hack above 603 print STDERR "WARNING: cannot resolve camera so cannot get resolvefile rules\n";605 print STDERR "WARNING: cannot resolve camera so cannot find file rules\n"; 604 606 next; 605 607 } … … 1085 1087 print $pointsList "$npoints $row->{CENTER_X} $row->{CENTER_Y}\n"; 1086 1088 $npoints++; 1089 # this gets overwitten if an overlapping image is found 1090 $row->{error_code} = $PSTAMP_NO_OVERLAP; 1087 1091 } 1088 1092 close $pointsList; … … 1129 1133 } 1130 1134 push @$ref, $ptnum; 1135 my $row = $rowList->[$ptnum]; 1136 # this row found a match 1137 $row->{error_code} = 0; 1131 1138 } 1132 1139 if ($verbose) { … … 1160 1167 my $images = runToolAndParse($command, $verbose); 1161 1168 if (!defined $images) { 1162 # XXX: need to get the set error_code to $PSTAMP_NO_OVERLAP1163 1169 print "No components containing coordinates found for ${stage}_id $stage_id\n"; 1164 1170 foreach my $row (@$rowList) { 1171 # XXX: This doesn't seem like the correct error code? 1165 1172 $row->{error_code} = $PSTAMP_NO_OVERLAP; 1166 1173 } … … 1323 1330 } 1324 1331 } 1332 # set error_code for an array of rows to a given value 1333 sub setErrorCodes { 1334 my $rowList = shift; 1335 my $code = shift; 1336 foreach my $row (@$rowList) { 1337 $row->{error_code} = $code; 1338 } 1339 } 1325 1340 1326 1341 sub my_die
Note:
See TracChangeset
for help on using the changeset viewer.
