- 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_chip_locations.pl
r42457 r42462 16 16 # USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage 0 17 17 18 my ($fulldate, $dateword, $chiplist, $stage, $topdir ) = &parse_cmdopts;18 my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts; 19 19 my ($neb_dbh, $gpc_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config"); 20 20 … … 27 27 28 28 # put output files in a directory defined by the night 29 mkdir "$ topdir/$dateword";29 mkdir "$basedir/$dateword"; 30 30 31 31 # output files: … … 48 48 my $Nfail = 0; 49 49 50 my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($ topdir, $dateword, $stage);50 my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($basedir, $dateword, $stage); 51 51 52 52 foreach my $chip_id (@chip_ids) { 53 53 54 54 my $outfh; 55 open ($outfh, ">$ topdir/$dateword/$chip_id.uris.$stage.txt");56 57 # print "open $ topdir/$dateword/$chip_id.uris.$stage.txt\n";55 open ($outfh, ">$basedir/$dateword/$chip_id.uris.$stage.txt"); 56 57 # print "open $basedir/$dateword/$chip_id.uris.$stage.txt\n"; 58 58 59 59 # get the list of chip neb paths for one chip … … 87 87 # now save the host count for this chip 88 88 my $hostfh; 89 open ($hostfh, ">$ topdir/$dateword/$chip_id.hosts.txt");89 open ($hostfh, ">$basedir/$dateword/$chip_id.hosts.txt"); 90 90 91 91 # save the host count for this chip … … 277 277 278 278 if (not defined $hostfile{$hostname}) { 279 open ($hostfile{$hostname}, ">$ topdir/$dateword/$hostname.inst.$stage.txt");279 open ($hostfile{$hostname}, ">$basedir/$dateword/$hostname.inst.$stage.txt"); 280 280 ## XXX deal with open failure here 281 281 } … … 408 408 sub get_good_or_fail_chiplists { 409 409 410 my $ topdir = $_[0];410 my $basedir = $_[0]; 411 411 my $dateword = $_[1]; 412 412 my $stage = $_[2]; … … 414 414 # load the lists of good and fail chips 415 415 my $prev = $stage - 1; 416 my $goodfile = "$ topdir/$dateword/goodchips.$prev.txt";416 my $goodfile = "$basedir/$dateword/goodchips.$prev.txt"; 417 417 my %goodchips; 418 418 if (-e $goodfile) { … … 426 426 } 427 427 } 428 my $failfile = "$ topdir/$dateword/failchips.$prev.txt";428 my $failfile = "$basedir/$dateword/failchips.$prev.txt"; 429 429 my %failchips; 430 430 if (-e $failfile) { … … 466 466 my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day); 467 467 468 return ($fulldate, $dateword, $chiplist, $stage, $topdir) 468 my $yearobs = substr ($dateword, 0, 4); 469 my $basedir = "$topdir/$yearobs"; 470 471 return ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) 469 472 } 470 473
Note:
See TracChangeset
for help on using the changeset viewer.
