- Timestamp:
- May 12, 2023, 9:21:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl
r42452 r42462 14 14 # USAGE: check_md5s_dateobs.pl --dateobs (night) --topdir (topdir) 15 15 16 my ($dateword, $stage, $topdir) = &parse_cmdopts; 17 18 my $instlist_r = &load_instlist_filenames ($topdir, $dateword, $stage); 19 my $md5slist_r = &load_md5slist_filenames ($topdir, $dateword, $stage, $instlist_r); 16 my ($dateword, $stage, $topdir, $basedir) = &parse_cmdopts; 17 # basedir used only for night-level files 18 19 my $instlist_r = &load_instlist_filenames ($basedir, $dateword, $stage); 20 my $md5slist_r = &load_md5slist_filenames ($basedir, $dateword, $stage, $instlist_r); 20 21 21 22 my $Nfail = 0; … … 36 37 close (FILE); 37 38 38 my $instdata_r = &load_instance_list ($ topdir, $dateword, $stage, $instfile);39 my $instdata_r = &load_instance_list ($basedir, $dateword, $stage, $instfile); 39 40 40 41 # if these do not match, complain and move on … … 94 95 95 96 # save both good and fail chip lists 96 open (OUTFILE, ">$ topdir/$dateword/goodchips.$stage.txt");97 open (OUTFILE, ">$basedir/$dateword/goodchips.$stage.txt"); 97 98 my @goodchipURIs = keys %goodchips; 98 99 foreach my $uri (@goodchipURIs) { … … 101 102 close (OUTFILE); 102 103 103 open (OUTFILE, ">$ topdir/$dateword/failchips.$stage.txt");104 open (OUTFILE, ">$basedir/$dateword/failchips.$stage.txt"); 104 105 my @failchipURIs = keys %failchips; 105 106 foreach my $uri (@failchipURIs) { … … 120 121 } 121 122 122 # use global $ topdir, $dateword, $myhost, $stage123 # use global $basedir, $dateword, $myhost, $stage 123 124 sub load_instance_list { 124 my $ topdir = $_[0];125 my $basedir = $_[0]; 125 126 my $dateword = $_[1]; 126 127 my $stage = $_[2]; … … 134 135 # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE 135 136 my ($myhost) = $instfile =~ m|$dateword/([0-9a-zA-Z]*).inst.$stage.txt|; 136 my @instlist = glob ("$ topdir/$dateword/$myhost.XY??.inst.$stage.txt");137 my @instlist = glob ("$basedir/$dateword/$myhost.XY??.inst.$stage.txt"); 137 138 foreach my $infile (@instlist) { 138 139 &load_instance_list_onefile ($infile, \@instdata_list); … … 160 161 sub load_instlist_filenames { 161 162 162 my $ topdir = $_[0];163 my $basedir = $_[0]; 163 164 my $dateword = $_[1]; 164 165 my $stage = $_[2]; 165 166 166 my @instlist_all = glob ("$ topdir/$dateword/*.inst.$stage.txt");167 my @instlist_all = glob ("$basedir/$dateword/*.inst.$stage.txt"); 167 168 168 169 my @instlist = (); … … 181 182 sub load_md5slist_filenames { 182 183 183 my $ topdir = $_[0];184 my $basedir = $_[0]; 184 185 my $dateword = $_[1]; 185 186 my $stage = $_[2]; 186 187 my $instlist_r = $_[3]; 187 188 188 my @md5slist = glob ("$ topdir/$dateword/*.md5s.txt");189 my @md5slist = glob ("$basedir/$dateword/*.md5s.txt"); 189 190 190 191 my %md5shash; … … 252 253 my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day); 253 254 254 return ($dateword, $stage, $topdir); 255 my $yearobs = substr ($dateword, 0, 4); 256 my $basedir = "$topdir/$yearobs"; 257 258 return ($dateword, $stage, $topdir, $basedir); 255 259 } 256 260
Note:
See TracChangeset
for help on using the changeset viewer.
