Changeset 32438
- Timestamp:
- Sep 23, 2011, 3:13:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20110622/ippScripts/scripts/lap_science.pl
r32433 r32438 27 27 my ( $camera, $dbname); 28 28 my ( $lap_id ); 29 my ( $queue_list ); 29 30 my ( $chip_mode, $monitor_mode, $cleanup_mode); 30 31 … … 44 45 45 46 'lap_id=s' => \$lap_id, 47 'queue_list=s' => \$queue_list, 46 48 47 49 'chip_mode' => \$chip_mode, … … 261 263 return($exposure); 262 264 } 265 266 if (($chip->{state} eq 'goto_cleaned')|| 267 ($warp->{state} eq 'goto_cleaned')|| 268 ($chip->{dsRun_state} eq 'goto_cleaned')) { 269 $exposure->{data_state} = 'pending_update'; 270 &update_this_exposure($exposure); 271 return($exposure); 272 } 273 263 274 264 275 my $chiptool_update_cmd = "chiptool -setimfiletoupdate -chip_id $exposure->{chip_id} -set_label $label"; … … 621 632 $have_diff ++; 622 633 $are_magicked ++; 634 next; 635 } 636 637 if ($exposure->{data_state} eq 'pending_update') { 638 $exposure->{data_state} = 'update'; 639 $exposure = &remake_this_exposure_by_update($exposure); 640 &update_this_exposure($exposure); 623 641 next; 624 642 } … … 1202 1220 sub cleanup_mode { 1203 1221 my $lap_id = shift; 1222 1223 if (defined($queue_list)) { 1224 my $successful = 1; 1225 open(Q,$queue_list) or ($successful = 0); 1226 if ($successful == 1) { 1227 while(<Q>) { 1228 chomp; 1229 my $cmd = $_; 1230 my ($projection_cell,$seq_id,$filter,$label); 1231 $projection_cell = $cmd; 1232 $projection_cell =~ s/.*?-projection_cell (skycell.\w+?) .*/$1/; 1233 $seq_id = $cmd; 1234 $seq_id =~ s/.*-seq_id (\d+?) .*/$1/; 1235 $filter = $cmd; 1236 $filter =~ s/.*-filter (\w\.00000) .*/$1/; 1237 if ($filter =~ /\s+?/) { 1238 $filter =~ s/.*-filter (\w\.00000)$/$1/; 1239 } 1240 $label = $cmd; 1241 $label =~ s/.*-label (.+?) .*/$1/; 1242 1243 my $response; 1244 chomp($response = 1245 `laptool -dbname gpc1 -listrun -projection_cell $projection_cell -seq_id $seq_id -filter $filter -label $label -simple`); 1246 my $state = (split /\s+/, $response)[5]; 1247 1248 unless (defined($state)) { 1249 if ($verbose) { 1250 print "Queuing: $cmd\n"; 1251 } 1252 system($cmd); 1253 1254 my $i = 0; 1255 do { 1256 sleep(5); 1257 chomp($response = 1258 `laptool -dbname gpc1 -listrun -projection_cell $projection_cell -seq_id $seq_id -filter $filter -label $label -simple`); 1259 $state = (split /\s+/, $response)[5]; 1260 $i++; 1261 unless(defined($state)) { 1262 $successful = 0; 1263 } 1264 } while (($state ne 'run')&&($i < 20)&&($successful)); 1265 last; 1266 } 1267 } 1268 close(Q); 1269 } 1270 } 1271 1204 1272 my $command = "$laptool -inactiveexp -lap_id $lap_id "; 1205 1273 $command .= " -dbname $dbname " if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
