- Timestamp:
- Mar 16, 2023, 12:48:31 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
r42406 r42415 36 36 my $Nxbck = 0; 37 37 38 my $Ncul1 = 0; 39 my $Ncul2 = 0; 40 my $Ncul3 = 0; 41 38 42 foreach my $chip_id (@chip_ids) { 39 43 … … 49 53 50 54 # we expect lines of the form: STATE PATH 51 # e.g., GOOD: gpc1/20100502/o5318g0002d/o5318g0002d.ota76.fits 52 if (@words != 2) { die "error in URI list $urifile, line: $line\n"; }55 # e.g., GOOD: gpc1/20100502/o5318g0002d/o5318g0002d.ota76.fits DataState MD5sum 56 if (@words != 4) { die "error in URI list $urifile, line: $line\n"; } 53 57 54 58 my $state = $words[0]; 55 59 my $ext_id = $words[1]; 60 my $datast = $words[2]; 61 my $md5sum = $words[3]; 56 62 57 63 if ($state eq "GOOD:") { $Ngood++; next; } 58 64 if ($state eq "DEAD:") { $Ndead++; next; } 59 65 if ($state eq "GONE:") { $Ngone++; next; } 60 if ($state eq "DUPS:") { $Ndups++; next; }61 if ($state eq "XBCK:") { $Nxbck++; next; }62 66 63 67 # one copy at ITC: neb-replicate will create a copy at ATRC … … 68 72 unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; } 69 73 open (OUTFILE, ">>$dateword/$newhost.inst.txt"); 70 print OUTFILE "$newfile \n";74 print OUTFILE "$newfile $datast $md5sum\n"; 71 75 close (OUTFILE); 72 76 $Nsing ++; … … 82 86 unless ($newxattr == 0) { die "new instance is not at ITC? $ext_id : $newfile : $newhost : $newxattr\n"; } 83 87 open (OUTFILE, ">>$dateword/$newhost.inst.txt"); 84 print OUTFILE "$newfile \n";88 print OUTFILE "$newfile $datast $md5sum\n"; 85 89 close (OUTFILE); 86 90 $Nsbck ++; 87 91 next; 88 92 } 93 94 # these are done in stage 2: 95 if ($state eq "DUPS:") { $Ndups++; next; } 96 if ($state eq "XBCK:") { $Nxbck++; next; } 97 98 # these are done in stage 3: 99 if ($state eq "CUL1:") { $Ncul1++; next; } 100 if ($state eq "CUL2:") { $Ncul2++; next; } 101 if ($state eq "CUL3:") { $Ncul3++; next; } 89 102 } 90 103 $volnum ++; … … 98 111 print "Nsbck: $Nsbck\n"; 99 112 print "Nxbck: $Nxbck\n"; 113 print "Ncul1: $Ncul1\n"; 114 print "Ncul2: $Ncul2\n"; 115 print "Ncul3: $Ncul3\n"; 100 116 101 117 exit 0;
Note:
See TracChangeset
for help on using the changeset viewer.
