IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 16, 2023, 12:48:31 PM (3 years ago)
Author:
eugene
Message:

various updates : adding stage 2

File:
1 edited

Legend:

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

    r42406 r42415  
    3636my $Nxbck = 0;
    3737
     38my $Ncul1 = 0;
     39my $Ncul2 = 0;
     40my $Ncul3 = 0;
     41
    3842foreach my $chip_id (@chip_ids) {
    3943
     
    4953
    5054        # 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"; }
    5357
    5458        my $state  = $words[0];
    5559        my $ext_id = $words[1];
     60        my $datast = $words[2];
     61        my $md5sum = $words[3];
    5662
    5763        if ($state eq "GOOD:") { $Ngood++; next; }
    5864        if ($state eq "DEAD:") { $Ndead++; next; }
    5965        if ($state eq "GONE:") { $Ngone++; next; }
    60         if ($state eq "DUPS:") { $Ndups++; next; }
    61         if ($state eq "XBCK:") { $Nxbck++; next; }
    6266
    6367        # one copy at ITC: neb-replicate will create a copy at ATRC
     
    6872            unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    6973            open (OUTFILE, ">>$dateword/$newhost.inst.txt");
    70             print OUTFILE "$newfile\n";
     74            print OUTFILE "$newfile $datast $md5sum\n";
    7175            close (OUTFILE);
    7276            $Nsing ++;
     
    8286            unless ($newxattr == 0) { die "new instance is not at ITC? $ext_id : $newfile : $newhost : $newxattr\n"; }
    8387            open (OUTFILE, ">>$dateword/$newhost.inst.txt");
    84             print OUTFILE "$newfile\n";
     88            print OUTFILE "$newfile $datast $md5sum\n";
    8589            close (OUTFILE);
    8690            $Nsbck ++;
    8791            next;
    8892        }
     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; }
    89102    }
    90103    $volnum ++;
     
    98111print "Nsbck: $Nsbck\n";
    99112print "Nxbck: $Nxbck\n";
     113print "Ncul1: $Ncul1\n";
     114print "Ncul2: $Ncul2\n";
     115print "Ncul3: $Ncul3\n";
    100116
    101117exit 0;
Note: See TracChangeset for help on using the changeset viewer.