- Timestamp:
- Apr 13, 2023, 2:17:26 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
r42449 r42450 24 24 my @vol_copy = &get_neb_volumes_copy; # array of neb hosts to copy data to at ITC 25 25 my %vol_good = &get_neb_volumes_good; # hash of valid neb hosts 26 27 my $Nchip = 0; # counts the number of instances 26 28 27 29 my $Ngood = 0; … … 38 40 my $Nfail = 0; 39 41 40 my $Nchip = 0; # counts the number of instances 41 42 # load the lists of good and fail chips 43 my $prev = $stage - 1; 44 my $goodfile = "$topdir/$dateword/goodchips.$prev.txt"; 45 my %goodchips; 46 if (-e $goodfile) { 47 open (GOODFILE, $goodfile); 48 my @lines = <GOODFILE>; 49 close (GOODFILE); 50 51 foreach my $line (@lines) { 52 chomp $line; 53 $goodchips{$line} = 1; 54 } 55 } 56 my $failfile = "$topdir/$dateword/failchips.$prev.txt"; 57 my %failchips; 58 if (-e $failfile) { 59 open (FAILFILE, $failfile); 60 my @lines = <FAILFILE>; 61 close (FAILFILE); 62 63 foreach my $line (@lines) { 64 chomp $line; 65 $failchips{$line} = 1; 66 } 67 } 42 my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($topdir, $dateword, $stage); 68 43 69 44 # read the list of chip_ids: … … 153 128 my $haveMD5 = 0; 154 129 my $goodMD5 = 0; 155 if ($goodchips {$ext_id}) { $haveMD5 = 1; $goodMD5 = 1; }156 if ($failchips {$ext_id}) { $haveMD5 = 1; }130 if ($goodchips_r->{$ext_id}) { $haveMD5 = 1; $goodMD5 = 1; } 131 if ($failchips_r->{$ext_id}) { $haveMD5 = 1; $goodMD5 = 0; } 157 132 158 133 $Nchip ++; … … 350 325 } 351 326 327 sub get_good_or_fail_chiplists { 328 329 my $topdir = $_[0]; 330 my $dateword = $_[1]; 331 my $stage = $_[2]; 332 333 # load the lists of good and fail chips 334 my $prev = $stage - 1; 335 my $goodfile = "$topdir/$dateword/goodchips.$prev.txt"; 336 my %goodchips; 337 if (-e $goodfile) { 338 open (GOODFILE, $goodfile); 339 my @lines = <GOODFILE>; 340 close (GOODFILE); 341 342 foreach my $line (@lines) { 343 chomp $line; 344 $goodchips{$line} = 1; 345 } 346 } 347 my $failfile = "$topdir/$dateword/failchips.$prev.txt"; 348 my %failchips; 349 if (-e $failfile) { 350 open (FAILFILE, $failfile); 351 my @lines = <FAILFILE>; 352 close (FAILFILE); 353 354 foreach my $line (@lines) { 355 chomp $line; 356 $failchips{$line} = 1; 357 } 358 } 359 return (\%goodchips, \%failchips); 360 } 361 352 362 # get the list of neb hosts to copy data to at ITC 353 363 sub get_neb_volumes_copy {
Note:
See TracChangeset
for help on using the changeset viewer.
