Changeset 38682 for trunk/tools/stsci_disks/p3_permcheck.pl
- Timestamp:
- Aug 24, 2015, 5:35:11 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tools/stsci_disks/p3_permcheck.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/stsci_disks/p3_permcheck.pl
r38680 r38682 71 71 72 72 my @volumes = (); 73 for (my $i = 4; $i <= 4; $i++) { 74 my $max = 3; 75 if ($i == 4) { $max = 2; } 73 for (my $i = 4; $i <= 5; $i++) { 74 my $max = 2; 76 75 for (my $j = 0; $j < $max; $j++) { 77 76 push @volumes, sprintf("ippb%02d.%1d",$i,$j); … … 83 82 my $command; 84 83 if ($stage eq 'raw') { 84 $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname"; 85 } 86 elsif ($stage eq 'isp') { 87 $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname"; 88 } 89 elsif ($stage eq 'ssp') { 85 90 $command = "regtool -processedimfile -data_state full -exp_id $stage_id -dbname $dbname"; 86 91 } … … 99 104 my @keys = (); 100 105 foreach my $stageEntry ( @{ $stageData } ) { 101 if ( $stage eq 'raw') {102 if ($stageEntry->{ignored}) { next; }103 push @keys, $stageEntry->{uri};106 if (($stage eq 'raw')||($stage eq 'ssp')||($stage eq 'isp')) { 107 if ($stageEntry->{ignored}) { next; } 108 push @keys, $stageEntry->{uri}; 104 109 } 105 110 elsif ($stage eq 'cam') { 106 push @keys, $stageEntry->{path_base} . ".smf";107 for (my $u = 0; $u < 8; $u++) {108 for (my $v = 0; $v < 8; $v++) {109 if ((($u == 0)||($u == 7))&&110 (($v == 0)||($v == 7))) { next; }111 push @keys, $stageEntry->{path_base} . ".XY${u}${v}.mk.fits";112 }113 }111 push @keys, $stageEntry->{path_base} . ".smf"; 112 for (my $u = 0; $u < 8; $u++) { 113 for (my $v = 0; $v < 8; $v++) { 114 if ((($u == 0)||($u == 7))&& 115 (($v == 0)||($v == 7))) { next; } 116 push @keys, $stageEntry->{path_base} . ".XY${u}${v}.mk.fits"; 117 } 118 } 114 119 } 115 120 } … … 120 125 my ($ipp_copies,$stsci_copies) = check_instances($key); 121 126 if ($stsci_copies != 0) { 122 for (my $i = 0; $i < $stsci_copies; $i++) {123 $neb->replicate($key,$rand_vol);124 }125 print ">> REP: $key $rand_vol\n";126 sleep(5);127 my ($ipp_copies,$stsci_copies) = check_instances($key);127 for (my $i = 0; $i < $stsci_copies; $i++) { 128 $neb->replicate($key,$rand_vol); 129 } 130 print ">> REP: $key $rand_vol\n"; 131 sleep(5); 132 my ($ipp_copies,$stsci_copies) = check_instances($key); 128 133 } 129 if ($ipp_copies == 1) {130 $neb->replicate($key,$rand_vol);131 print ">> REP: $key $rand_vol\n";132 sleep(5);133 my ($ipp_copies,$stsci_copies) = check_instances($key);134 }135 if ($ipp_copies >= 2) {136 $good ++;134 # if ($ipp_copies == 1) { 135 # $neb->replicate($key,$rand_vol); 136 # print ">> REP: $key $rand_vol\n"; 137 # sleep(5); 138 # my ($ipp_copies,$stsci_copies) = check_instances($key); 139 # } 140 if ($ipp_copies >= 1) { 141 $good ++; 137 142 } 138 143 else { 139 print ">> $ipp_copies $stsci_copies\n";140 push @issues, $key;144 print ">> $ipp_copies $stsci_copies\n"; 145 push @issues, $key; 141 146 } 142 147 print "$key $good $#issues\n"; … … 146 151 if ($#issues != -1) { 147 152 foreach my $key (@issues) { 148 my ($ipp_copies,$stsci_copies) = check_instances($key);149 if ($ipp_copies < 2) {150 print "CHECK: $key\n";151 $bad++;152 }153 my ($ipp_copies,$stsci_copies) = check_instances($key); 154 if ($ipp_copies < 2) { 155 print "CHECK: $key\n"; 156 $bad++; 157 } 153 158 } 154 159 } … … 163 168 my $ipp_copies = 0; 164 169 my $stsci_copies = 0; 165 foreach my $uri (@{ $uris }) { 166 if ($uri =~ /file:...data.ipp/) {167 $ipp_copies++;168 }169 if ($uri =~ /file:...data.stsci/) {170 $stsci_copies++;171 }170 foreach my $uri (@{ $uris }) { 171 if ($uri =~ /file:...data.ipp/) { 172 $ipp_copies++; 173 } 174 if ($uri =~ /file:...data.stsci/) { 175 $stsci_copies++; 176 } 172 177 } 173 178 return($ipp_copies,$stsci_copies);
Note:
See TracChangeset
for help on using the changeset viewer.
