Changeset 39986
- Timestamp:
- Feb 24, 2017, 5:36:47 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/rawcheck.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/rawcheck.pl
r39985 r39986 175 175 my $mdcParser = PS::IPP::Metadata::Config->new; 176 176 177 print("$regtool -processedimfile -exp_id $exp_id -dbname $dbname ");177 print("$regtool -processedimfile -exp_id $exp_id -dbname $dbname\n"); 178 178 my $regtool_cmd = "$regtool -processedimfile -exp_id $exp_id -dbname $dbname"; 179 179 my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 189 189 my $timer = time(); 190 190 print "## rawcheck.pl: $exp_id $dbname $do_cull $do_ops $timer_start\n"; 191 # Do prescan checks. 192 if ($#{ $imfiles } > 0) { 193 my @to_do_imfiles = (); 194 my $prior_imfile; 195 my $append = 0; 196 197 foreach my $imfile (@$imfiles) { 198 my $key = $imfile->{uri}; 199 my $data_state = $imfile->{data_state}; 200 my $md5sum = $imfile->{md5sum}; 201 my $hostname = $imfile->{hostname}; 202 my $class_id = $imfile->{class_id}; 203 204 my $stat = $neb->stat($key); 205 die "nebulous key: $key not found" unless $stat; 206 my $instances = $neb->find_instances($key, 'any'); 207 die "no instances found" unless $instances; 208 my @files = map {URI->new($_)->file if $_} @$instances; 209 210 print ("\n#PRE: $key $data_state $md5sum $hostname $class_id T: $timer\n"); 211 212 my $has_itc_copy = 0; 213 my @validation = (); 214 for (my $i = 0; $i <= $#files; $i++) { 215 # Check for itc copy. 216 my ($instance_exists,$instance_md5sum,$instance_host,$instance_volume,$instance_site, $is_good); 217 ($instance_host,$instance_volume) = parse_volume($files[$i]); 218 $instance_site = $volume_map{$instance_volume}; 219 220 if ($instance_site eq 'ITC') { 221 $has_itc_copy = 1; 222 } 223 224 225 $validation[$i] = sprintf(" % 3d %d %32s %s %s %s %s\n", 226 -1,-1,"UNCHECKED", 227 $files[$i],$instance_host,$instance_volume,$instance_site); 228 229 } 230 my $val_string = join('',@validation); 231 print "$val_string"; 232 233 if ($append == 0) { 234 if ($has_itc_copy == 0) { 235 if (defined($prior_imfile)) { 236 push @to_do_imfiles, $prior_imfile; 237 } 238 $append = 1; 239 } 240 } 241 242 if ($append == 1) { 243 push @to_do_imfiles, $imfile; 244 } 245 printf( "#PRE_RESULT: %2d %2d %2d %2d\n",$has_itc_copy,$append,$#to_do_imfiles,$#{ $imfiles }); 246 $prior_imfile = $imfile; 247 } 248 249 @$imfiles = @to_do_imfiles; 250 } 251 # End prescan checks. 252 191 253 # Loop over the imfiles of this exposure. 192 254 foreach my $imfile (@$imfiles) { … … 230 292 $instance_exists = 1; 231 293 $existing_copies++; 294 if ($instance_site eq 'ITC') { # This is here to force checking of ITC copy. 295 $continue_checking_md5sums = 1; 296 } 232 297 if ($continue_checking_md5sums == 1) { #unsafe 233 298 $instance_md5sum = local_md5sum($files[$i]);
Note:
See TracChangeset
for help on using the changeset viewer.
