Changeset 15474 for trunk/ippScripts/scripts/ipp_serial_chip.pl
- Timestamp:
- Nov 6, 2007, 12:02:09 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/ipp_serial_chip.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_serial_chip.pl
r14492 r15474 38 38 39 39 # Phase 2 imfile processing 40 my $list;40 my @whole; # The whole list for processing 41 41 { 42 42 my $command = "$chiptool -pendingimfile -dbname $dbname"; # Command to run … … 44 44 run( command => $command, verbose => 1 ); 45 45 die "Unable to get phase 2 imfile list: $error_code\n" if not $success; 46 $list = parse_md_list( $mdcParser->parse( join( '', @$stdout_buf ) ) ) or 47 die "Unable to parse output from chiptool.\n"; 46 my @whole = split /\n/, join( '', @$stdout_buf ); 48 47 } 49 48 50 foreach my $item (@$list) { 51 my $chip_id = $item->{chip_id}; 52 my $exp_id = $item->{exp_id}; 53 my $exp_tag = $item->{exp_tag}; 54 my $camera = $item->{camera}; 55 my $class_id = $item->{class_id}; 56 my $uri = $item->{uri}; 57 my $reduction = $item->{reduction}; 58 59 my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera"; 60 $command .= " --reduction $reduction" if defined $reduction; 61 $command .= " --no-op" if defined $no_op; 62 $command .= " --no-update" if defined $no_update; 63 $command .= " --workdir $workdir" if defined $workdir; 64 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 65 run( command => $command, verbose => 1 ); 66 die "Unable to do phase 2 processing on $chip_id $class_id: $error_code\n" if not $success; 49 my @single = (); 50 51 while ( scalar @while > 0 ) { 52 my $value = shift @whole; 53 push @single, $value; 54 if ($value =~ /^\s*END\s*$/) { 55 push @single, "\n"; 56 57 my $list = parse_md_list( $mdcParser->parse( join( "\n", @single ) ) ) or 58 die "Unable to parse output from chiptool.\n"; 59 60 foreach my $item (@$list) { 61 my $chip_id = $item->{chip_id}; 62 my $exp_id = $item->{exp_id}; 63 my $exp_tag = $item->{exp_tag}; 64 my $camera = $item->{camera}; 65 my $class_id = $item->{class_id}; 66 my $uri = $item->{uri}; 67 my $reduction = $item->{reduction}; 68 69 my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera"; 70 $command .= " --reduction $reduction" if defined $reduction; 71 $command .= " --no-op" if defined $no_op; 72 $command .= " --no-update" if defined $no_update; 73 $command .= " --workdir $workdir" if defined $workdir; 74 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 75 run( command => $command, verbose => 1 ); 76 die "Unable to do phase 2 processing on $chip_id $class_id: $error_code\n" if not $success; 77 } 78 79 @single = (); 80 81 } 67 82 } 68 83
Note:
See TracChangeset
for help on using the changeset viewer.
