Changeset 28529 for trunk/ippToPsps/scripts/ippToPsps_run.pl
- Timestamp:
- Jun 28, 2010, 4:26:47 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/scripts/ippToPsps_run.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/scripts/ippToPsps_run.pl
r28260 r28529 10 10 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock'; 11 11 use File::Temp qw(tempfile); 12 use XML::LibXML; 12 13 13 14 # globals … … 73 74 74 75 # make a temporary file for saving results 75 my ($resultsFile, $resultsFile Name) = tempfile( "/tmp/ippToPsps_results.XXXX", UNLINK => !$save_temps);76 my ($resultsFile, $resultsFilePath) = tempfile( "/tmp/ippToPsps_results.XXXX", UNLINK => !$save_temps); 76 77 77 78 process(); … … 118 119 } 119 120 120 121 121 ####################################################################################### 122 122 # … … 160 160 AND chipRun.exp_id = rawExp.exp_id 161 161 AND camRun.dist_group = '$survey' 162 AND rawExp.dateobs >= '2010-02-20' 162 163 GROUP BY rawExp.exp_id 163 164 ORDER BY rawExp.exp_id ASC; … … 457 458 458 459 # read results 459 open (MYFILE, $resultsFileName); 460 my $i = 0; 461 462 # detection results 463 my $minObjId; 464 my $maxObjId; 465 my $filename; 466 if($batchType eq 'det') { 467 468 while (<MYFILE>) { 469 chomp; 470 if ($i == 0) { $filename = $_; } 471 if ($i == 1) { $minObjId = $_; } 472 if ($i == 2) { $maxObjId = $_; } 473 $i++; 474 } 475 } 476 close (MYFILE); 460 my $parser = XML::LibXML->new; 461 my $doc = $parser->parse_file($resultsFilePath); 462 my $filename = $doc->findvalue('//filename'); 463 my $minObjId = $doc->findvalue('//minObjID'); 464 my $maxObjId = $doc->findvalue('//maxObjID'); 477 465 478 466 # create XML file … … 794 782 $command .= " -survey $surveyType"; 795 783 $command .= " -batch $batchType"; 796 $command .= " -results $resultsFile Name";784 $command .= " -results $resultsFilePath"; 797 785 798 786 # run command
Note:
See TracChangeset
for help on using the changeset viewer.
