IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42462


Ignore:
Timestamp:
May 12, 2023, 9:21:20 AM (3 years ago)
Author:
eugene
Message:

changing directory structure to place nights in years

Location:
trunk/tools/eam/rawfix.20230221/src
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl

    r42452 r42462  
    1313
    1414# USAGE: advance.rawfix.pl --mode (all/night) --dateobs (night) --topdir (dirname) --Nmax Nmax
     15# topdir used only to find the nebulous config
    1516
    1617my ($mode, $topdir, $fulldate, $dateword, $Nmax) = &parse_cmdopts;
  • trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl

    r42457 r42462  
    1616# USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage 0
    1717
    18 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
     18my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts;
    1919my ($neb_dbh, $gpc_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
    2020
     
    2727
    2828# put output files in a directory defined by the night
    29 mkdir "$topdir/$dateword";
     29mkdir "$basedir/$dateword";
    3030
    3131# output files:
     
    4848my $Nfail = 0;
    4949
    50 my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($topdir, $dateword, $stage);
     50my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($basedir, $dateword, $stage);
    5151
    5252foreach my $chip_id (@chip_ids) {
    5353
    5454    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";
    5858
    5959    # get the list of chip neb paths for one chip
     
    8787    # now save the host count for this chip
    8888    my $hostfh;
    89     open ($hostfh, ">$topdir/$dateword/$chip_id.hosts.txt");
     89    open ($hostfh, ">$basedir/$dateword/$chip_id.hosts.txt");
    9090
    9191    # save the host count for this chip
     
    277277
    278278        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");
    280280            ## XXX deal with open failure here
    281281        }
     
    408408sub get_good_or_fail_chiplists {
    409409
    410     my $topdir   = $_[0];
     410    my $basedir   = $_[0];
    411411    my $dateword = $_[1];
    412412    my $stage    = $_[2];
     
    414414    # load the lists of good and fail chips
    415415    my $prev = $stage - 1;
    416     my $goodfile = "$topdir/$dateword/goodchips.$prev.txt";
     416    my $goodfile = "$basedir/$dateword/goodchips.$prev.txt";
    417417    my %goodchips;
    418418    if (-e $goodfile) {
     
    426426        }
    427427    }
    428     my $failfile = "$topdir/$dateword/failchips.$prev.txt";
     428    my $failfile = "$basedir/$dateword/failchips.$prev.txt";
    429429    my %failchips;
    430430    if (-e $failfile) {
     
    466466    my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
    467467
    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)
    469472}
    470473
  • trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl

    r42452 r42462  
    1414# USAGE: check_md5s_dateobs.pl --dateobs (night) --topdir (topdir)
    1515
    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);
     16my ($dateword, $stage, $topdir, $basedir) = &parse_cmdopts;
     17# basedir used only for night-level files
     18
     19my $instlist_r = &load_instlist_filenames ($basedir, $dateword, $stage);
     20my $md5slist_r = &load_md5slist_filenames ($basedir, $dateword, $stage, $instlist_r);
    2021
    2122my $Nfail = 0;
     
    3637    close (FILE);
    3738
    38     my $instdata_r = &load_instance_list ($topdir, $dateword, $stage, $instfile);
     39    my $instdata_r = &load_instance_list ($basedir, $dateword, $stage, $instfile);
    3940
    4041    # if these do not match, complain and move on
     
    9495
    9596# save both good and fail chip lists
    96 open (OUTFILE, ">$topdir/$dateword/goodchips.$stage.txt");
     97open (OUTFILE, ">$basedir/$dateword/goodchips.$stage.txt");
    9798my @goodchipURIs = keys %goodchips;
    9899foreach my $uri (@goodchipURIs) {
     
    101102close (OUTFILE);
    102103
    103 open (OUTFILE, ">$topdir/$dateword/failchips.$stage.txt");
     104open (OUTFILE, ">$basedir/$dateword/failchips.$stage.txt");
    104105my @failchipURIs = keys %failchips;
    105106foreach my $uri (@failchipURIs) {
     
    120121}
    121122
    122 # use global $topdir, $dateword, $myhost, $stage
     123# use global $basedir, $dateword, $myhost, $stage
    123124sub load_instance_list {
    124     my $topdir   = $_[0];
     125    my $basedir   = $_[0];
    125126    my $dateword = $_[1];
    126127    my $stage    = $_[2];
     
    134135    # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE
    135136    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");
    137138    foreach my $infile  (@instlist) {
    138139        &load_instance_list_onefile ($infile, \@instdata_list);
     
    160161sub load_instlist_filenames {
    161162   
    162     my $topdir   = $_[0];
     163    my $basedir   = $_[0];
    163164    my $dateword = $_[1];
    164165    my $stage    = $_[2];
    165166
    166     my @instlist_all = glob ("$topdir/$dateword/*.inst.$stage.txt");
     167    my @instlist_all = glob ("$basedir/$dateword/*.inst.$stage.txt");
    167168
    168169    my @instlist = ();
     
    181182sub load_md5slist_filenames {
    182183
    183     my $topdir     = $_[0];
     184    my $basedir     = $_[0];
    184185    my $dateword   = $_[1];
    185186    my $stage      = $_[2];
    186187    my $instlist_r = $_[3];
    187188
    188     my @md5slist = glob ("$topdir/$dateword/*.md5s.txt");
     189    my @md5slist = glob ("$basedir/$dateword/*.md5s.txt");
    189190
    190191    my %md5shash;
     
    252253    my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
    253254
    254     return ($dateword, $stage, $topdir);
     255    my $yearobs = substr ($dateword, 0, 4);
     256    my $basedir = "$topdir/$yearobs";
     257
     258    return ($dateword, $stage, $topdir, $basedir);
    255259}
    256260
  • trunk/tools/eam/rawfix.20230221/src/check_night_status.pl

    r42445 r42462  
    11#! /usr/bin/env perl
     2# this program must be run at the top-level rawfix directory
    23
    34my $DEBUG = 4;
     
    1819
    1920my ($fulldate, $dateword, $chiplist, $stage) = &parse_cmdopts;
     21my $yearobs = substr ($dateword, 0, 4);
    2022
    2123# read the list of chip_ids:
     
    3638foreach my $chip_id (@chip_ids) {
    3739
    38     my $urifile = "$dateword/$chip_id.uris.$stage.txt";
     40    my $urifile = "$yearobs/$dateword/$chip_id.uris.$stage.txt";
    3941    unless (-e $urifile) { die "missing chip URI list $urifile\n"; }
    4042
  • trunk/tools/eam/rawfix.20230221/src/finish.fixchip.sh

    r42449 r42462  
    11#!/bin/csh
     2
     3# this script is not actually used in regular rawfix processing?
    24
    35if ($#argv != 4) then
     
    1618endif
    1719
    18 if (! -d $topdir/$dateobs) then
    19   echo "ERROR: missing dateobs directory $topdir/$dateobs"
     20set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
     21set basedir = $topdir/$yearobs
     22
     23if (! -d $basedir/$dateobs) then
     24  echo "ERROR: missing dateobs directory $basedir/$dateobs"
    2025  exit 3
    2126endif
     
    2429echo $fulldate
    2530
    26 $topdir/update_chip_stats.pl --topdir $topdir --dateobs $fulldate --stage $iter --chiplist gpc1.chips.txt
     31update_chip_stats.pl --topdir $topdir --dateobs $fulldate --stage $iter --chiplist gpc1.chips.txt
    2732
    2833if ($QUALITY == "OK") then
    29   $topdir/update.rawfix.sh $dateobs fixchip.done
     34  update.rawfix.sh $dateobs fixchip.done
    3035else
    31   $topdir/update.rawfix.sh $dateobs fixchip.fail
     36  update.rawfix.sh $dateobs fixchip.fail
    3237endif
    3338
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl

    r42445 r42462  
    11#! /usr/bin/env perl
    22
    3 XXX: not yet ready
     3die "not yet ready";
    44
    55# NOTE: in this script, we are using database connections to both NEBULOUS and GPC1 databases
  • trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl

    r42451 r42462  
    1818# for each chip, target a single host?
    1919
    20 my ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir) = &parse_cmdopts;
     20my ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir, $basedir) = &parse_cmdopts;
    2121my ($neb_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
     22# topdir used for nebulous.config and chiplist.txt, basedir used for night-level data
    2223
    2324# choose ITC machines on which to place backup copies:
     
    4041my $Nfail = 0;
    4142
    42 my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($topdir, $dateword, $stage);
     43my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($basedir, $dateword, $stage);
    4344
    4445# read the list of chip_ids:
     
    8081} else {
    8182
    82     open (OUTFILE, ">$topdir/$dateword/$chipID.stats.$stage.txt");
     83    open (OUTFILE, ">$basedir/$dateword/$chipID.stats.$stage.txt");
    8384
    8485    print OUTFILE "Nchip: $Nchip\n";
     
    106107
    107108    # read from chip_id file, update to next stage number
    108     my $urifile = "$topdir/$dateword/$chip_id.uris.$stage.txt";
     109    my $urifile = "$basedir/$dateword/$chip_id.uris.$stage.txt";
    109110    if (! -e $urifile) { die "missing file $urifile\n"; }
    110111    open (URIFILE,  $urifile);
     
    145146            my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
    146147            unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    147             open (OUTFILE, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
     148            open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
    148149            print OUTFILE "$newfile $datast $md5sum\n";
    149150            close (OUTFILE);
     
    160161            my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
    161162            unless ($newxattr == 0) { die "new instance is not at ITC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    162             open (OUTFILE, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
     163            open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
    163164            print OUTFILE "$newfile $datast $md5sum\n";
    164165            close (OUTFILE);
     
    175176                my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
    176177                unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    177                 open (OUTFILE, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
     178                open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
    178179                print OUTFILE "$newfile $datast $md5sum\n";
    179180                close (OUTFILE);
     
    197198                my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
    198199                unless ($newxattr == 0) { die "new instance is not at ITC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    199                 open (OUTFILE, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
     200                open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
    200201                print OUTFILE "$newfile $datast $md5sum\n";
    201202                close (OUTFILE);
     
    327328sub get_good_or_fail_chiplists {
    328329
    329     my $topdir   = $_[0];
     330    my $basedir   = $_[0];
    330331    my $dateword = $_[1];
    331332    my $stage    = $_[2];
     
    333334    # load the lists of good and fail chips
    334335    my $prev = $stage - 1;
    335     my $goodfile = "$topdir/$dateword/goodchips.$prev.txt";
     336    my $goodfile = "$basedir/$dateword/goodchips.$prev.txt";
    336337    my %goodchips;
    337338    if (-e $goodfile) {
     
    345346        }
    346347    }
    347     my $failfile = "$topdir/$dateword/failchips.$prev.txt";
     348    my $failfile = "$basedir/$dateword/failchips.$prev.txt";
    348349    my %failchips;
    349350    if (-e $failfile) {
     
    464465    my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
    465466
    466     return ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir);
     467    my ($yearobs) = substr ($dateword, 0, 4);
     468    my $basedir = "$topdir/$yearobs";
     469
     470    return ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir, $basedir);
    467471}
    468472
  • trunk/tools/eam/rawfix.20230221/src/get_hosts_fixchip.sh

    r42457 r42462  
    1515endif
    1616
    17 if (! -d $topdir/$dateobs) then
    18   echo "ERROR: missing dateobs directory $topdir/$dateobs"
     17set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
     18set basedir = $topdir/$yearobs
     19
     20if (! -d $basedir/$dateobs) then
     21  echo "ERROR: missing dateobs directory $basedir/$dateobs"
    1922  exit 3
    2023endif
     
    2326echo "dateobs chipID iter fixhost"
    2427
    25 foreach f ($topdir/$dateobs/XY??.hosts.txt)
     28foreach f ($basedir/$dateobs/XY??.hosts.txt)
    2629  set myhost = `cat $f | grep -v ippb | sort -k 2n | tail -n 1 | prcol 1`
    2730  set chipID = `echo $f | awk -F/ '{print $NF}' | awk -F. '{print $1}'`
  • trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh

    r42452 r42462  
    1515endif
    1616
    17 if (! -d $topdir/$dateobs) then
    18   echo "ERROR: missing dateobs directory $topdir/$dateobs"
     17set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
     18set basedir = $topdir/$yearobs
     19
     20if (! -d $basedir/$dateobs) then
     21  echo "ERROR: missing dateobs directory $basedir/$dateobs"
    1922  exit 3
    2023endif
    2124
    2225# report both the dateobs and the hostnames
    23 ls $topdir/$dateobs/*.inst.$stage.txt | grep -v "XY...inst" | awk -v dateobs=$dateobs -v stage=$stage -F/ '(NR == 1){print "dateobs stage md5host"}{print dateobs, stage, $NF}' | sed s/.inst.$stage.txt//
     26ls $basedir/$dateobs/*.inst.$stage.txt | grep -v "XY...inst" | awk -v dateobs=$dateobs -v stage=$stage -F/ '(NR == 1){print "dateobs stage md5host"}{print dateobs, stage, $NF}' | sed s/.inst.$stage.txt//
    2427exit 0
  • trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl

    r42451 r42462  
    1414
    1515my $input;
    16 my ($myhost, $dateword, $topdir, $stage) = &parse_cmdopts;
     16my ($myhost, $dateword, $topdir, $basedir, $stage) = &parse_cmdopts;
    1717
    1818# check that we are running this script on 'myhost'
     
    2323my ($ins_list_r, $dst_list_r, $md5_list_r) = &load_instance_list ();
    2424
    25 my $output = "$topdir/$dateword/$myhost.md5s.txt";
     25my $output = "$basedir/$dateword/$myhost.md5s.txt";
    2626
    2727# read in existing md5s
     
    6666exit 0;
    6767
    68 # use global $topdir, $dateword, $myhost, $stage
     68# use global $basedir, $dateword, $myhost, $stage
    6969sub load_instance_list {
    7070    my (@ins_list, @dst_list, @md5_list);
    7171
    7272    # load the master list
    73     my $input = "$topdir/$dateword/$myhost.inst.$stage.txt";
     73    my $input = "$basedir/$dateword/$myhost.inst.$stage.txt";
    7474    &load_instance_list_onefile ($input, \@ins_list, \@dst_list, \@md5_list);
    7575
    7676    # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE
    77     my @instlist = glob ("$topdir/$dateword/$myhost.XY??.inst.$stage.txt");
     77    my @instlist = glob ("$basedir/$dateword/$myhost.XY??.inst.$stage.txt");
    7878    foreach my $infile  (@instlist) {
    7979        &load_instance_list_onefile ($infile, \@ins_list, \@dst_list, \@md5_list);
     
    144144    unless ($stage >= 0) { die "stage must be a non-negative integer\n"; }
    145145   
    146     return ($myhost, $dateobs, $topdir, $stage);
     146    my $yearobs = substr ($dateobs, 0, 4);
     147    my $basedir = "$topdir/$yearobs";
     148
     149    return ($myhost, $dateobs, $topdir, $basedir, $stage);
    147150}
    148151
  • trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt

    r42460 r42462  
    168168    end
    169169
    170     sprintf psvidOutput "%s/%s" $mypath $DATEOBS
     170    sprintf psvidOutput "%s/%s/%s" $mypath $YEAR $DATEOBS
    171171
    172172    # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs
  • trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt

    r42454 r42462  
    5959  periods      -timeout 60
    6060  host         -required $HOST_CKCHIP
    61   npending 1
     61  npending 2
    6262
    6363  task.exec
     
    7878    option $pageName
    7979
    80     # this is the first place in the proces that this location is known
    81     mkdir  $mypath/$DATEOBS
    82     stdout $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER
    83     stderr $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER 
    84 
    8580    substr $DATEOBS 0 4 YEAR
    8681    substr $DATEOBS 4 2 MONTH
    8782    substr $DATEOBS 6 2 DAY
     83
     84    # this is the first place in the proces that this location is known
     85    mkdir  $mypath/$YEAR/$DATEOBS
     86    stdout $mypath/$YEAR/$DATEOBS/log.ckchip.runhosts.v$ITER
     87    stderr $mypath/$YEAR/$DATEOBS/log.ckchip.runhosts.v$ITER 
    8888
    8989    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
  • trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt

    r42454 r42462  
    151151    option $pageName $DATEOBS
    152152
    153     stdout $DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
    154     stderr $DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
    155 
    156153    substr $DATEOBS 0 4 YEAR
    157154    substr $DATEOBS 4 2 MONTH
    158155    substr $DATEOBS 6 2 DAY
    159156    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
     157
     158    stdout $mypath/$YEAR/$DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
     159    stderr $mypath/$YEAR/$DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
    160160
    161161    host -required $FIXHOST
  • trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt

    r42454 r42462  
    8282
    8383    # does the output go here?
    84     stdout $mypath/$DATEOBS/log.md5chk.v$ITER
    85     stderr $mypath/$DATEOBS/log.md5chk.v$ITER
     84    stdout $mypath/$YEAR/$DATEOBS/log.md5chk.v$ITER
     85    stderr $mypath/$YEAR/$DATEOBS/log.md5chk.v$ITER
    8686
    8787    ## this command does NOT use Nebulous or GPC so it can run anywhere
  • trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt

    r42454 r42462  
    156156    # save DATEOBS so we can find the md5sum.book entry
    157157
     158    substr $DATEOBS 0 4 YEAR
     159
    158160    # does the output go here?
    159     stdout $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 
    160     stderr $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER 
     161    stdout $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER 
     162    stderr $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER 
    161163
    162164    $USE_HOST = $MD5HOST
  • trunk/tools/eam/rawfix.20230221/src/update_chip_stats.pl

    r42449 r42462  
    1313
    1414# USAGE: update_chip_locations.pl --dateobs (night) --stage (0,1,etc) --chiplist (file)
    15 
    16 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
     15# nebulous.config & chiplist.txt are at topdir
     16
     17my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts;
    1718my ($raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
    1819
     
    3839foreach my $chip_id (@chip_ids) {
    3940
    40     open (STATFILE, "$topdir/$dateword/$chip_id.stats.$stage.txt");
     41    open (STATFILE, "$basedir/$dateword/$chip_id.stats.$stage.txt");
    4142    my @lines = <STATFILE>;
    4243    close (STATFILE);
     
    154155    my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
    155156
    156     return ($fulldate, $dateword, $chiplist, $stage, $topdir);
     157    my ($yearobs) = substr ($dateword, 0, 4);
     158    my $basedir = "$topdir/$yearobs";
     159
     160    return ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir);
    157161}
    158162
Note: See TracChangeset for help on using the changeset viewer.