Changeset 26204 for trunk/pstamp/scripts/pstamp_get_image_job.pl
- Timestamp:
- Nov 19, 2009, 5:32:10 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_get_image_job.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_get_image_job.pl
r26151 r26204 53 53 die $err if $err; 54 54 55 my $params_file = $output_base . ". params";55 my $params_file = $output_base . ".mdc"; 56 56 if (! open(INPUT, "<$params_file") ) { 57 57 die("failed to open params file: $params_file"); 58 58 } 59 59 60 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 61 60 62 my $params = join "", (<INPUT>); 61 63 62 print STDERR "\nparams is $params\n"; 64 my $data = $mdcParser->parse($params) or die("failed to parse metadata config doc"); 65 my $components = parse_md_list($data); 66 my $n = scalar @$components; 67 if ($n != 1) { 68 die("params file $params_file contains unexpected number of components: $n"); 69 } 70 my $comp = $components->[0]; 71 my $stage = $comp->{stage}; 72 my $stage_id = $comp->{stage_id}; 73 my $component = $comp->{component}; 74 my $path_base = $comp->{path_base}; 75 my $camera = $comp->{camera}; 76 my $magicked = $comp->{magicked}; 63 77 64 my ($stage, $stage_id, $component, $path_base, $camera) = split " ", $params; 65 if (!$camera or !$path_base or !$component or !$stage_id or !$stage) { 66 die "failed to parse params: $params"; 78 if ($verbose) { 79 print STDERR "\nstage is $stage\n"; 80 print STDERR "stage_id is $stage_id\n"; 81 print STDERR "path_base is $path_base\n"; 82 print STDERR "path_base is $path_base\n"; 83 print STDERR "CAMERA is $camera\n"; 84 print STDERR "magicked is " . (defined $magicked ? $magicked : "undefined") . "\n"; 67 85 } 68 86 69 print STDERR "\nCAMERA is $camera\n"; 87 if (!$camera or !$path_base or !$component or !$stage_id or !$stage) { 88 die "failed to parse params from: $params_file"; 89 } 90 70 91 71 92 my $out_dir = dirname($output_base); 72 my $prefix = basename($output_base) ;93 my $prefix = basename($output_base) . "_"; 73 94 my $results_file = $output_base . ".bundle_results"; 74 95 … … 86 107 $command .= " --path_base $path_base --outdir $out_dir --results_file $results_file"; 87 108 $command .= " --prefix $prefix"; 88 # ignore magic for now 89 $command .= " --no_magic"; 90 109 $command .= " --magicked" if $magicked; 91 110 $command .= " --dbname $dbname" if $dbname; 111 $command .= " --verbose" if $verbose; 92 112 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 93 113 run(command => $command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
