Changeset 29191
- Timestamp:
- Sep 22, 2010, 8:39:51 AM (16 years ago)
- Location:
- trunk/ippToPsps/perl/ippToPsps
- Files:
-
- 2 edited
-
Batch.pm (modified) (2 diffs)
-
DetectionBatch.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/perl/ippToPsps/Batch.pm
r29189 r29191 455 455 # create temporary input file for file list 456 456 my ($resultsFile, $resultsFilePath) = tempfile( "/tmp/ippToPsps_results.XXXX", UNLINK => !$self->{_save_temps}); 457 # TODO create input file here 457 458 458 # get list of input files 459 my $inputFile = $self->createInputFileList(); 460 461 # run IppToPsps program TODO should not need 462 my $success = $self->runProgram($inputFile, $resultsFilePath); 463 if (!$self->{_save_temps}) {unlink $inputFile}; 464 465 if ($success) { 466 467 # TODO type-specific processing 468 $self->parseResults($resultsFilePath); 469 470 # tar n' zip 471 if (!$self->{_dontTarball} && $self->createTarball()) { 472 473 # and publish 474 if (defined $self->{_datastore} && 475 $self->{_datastore}->register($self->{_name}, $self->{_subDir}, $self->{_filename}, "IPP_PSPS", "tgz")) { 476 $self->{_ippToPspsDb}->setPublished($self->{_batchId}, $self->{_expId}, 1); 459 my ($inputFile, $inputPath) = tempfile( "/tmp/ippToPsps_inputFileList.XXXX", UNLINK => !$self->{_save_temps}); 460 461 my $success = 0; 462 if ($self->createInputFileList($inputFile)) { 463 464 # run IppToPsps program TODO should not need 465 $success = $self->runProgram($inputPath, $resultsFilePath); 466 467 if ($success) { 468 469 # TODO type-specific processing 470 $self->parseResults($resultsFilePath); 471 472 # tar n' zip 473 if (!$self->{_dontTarball} && $self->createTarball()) { 474 475 # and publish 476 if (defined $self->{_datastore} && 477 $self->{_datastore}->register($self->{_name}, $self->{_subDir}, $self->{_filename}, "IPP_PSPS", "tgz")) { 478 $self->{_ippToPspsDb}->setPublished($self->{_batchId}, $self->{_expId}, 1); 479 } 477 480 } 478 481 } … … 480 483 481 484 close $resultsFile; 485 close $inputFile; 486 482 487 if (!$self->{_save_temps}) {unlink $resultsFile}; 488 if (!$self->{_save_temps}) {unlink $inputFile}; 483 489 484 490 return $success; -
trunk/ippToPsps/perl/ippToPsps/DetectionBatch.pm
r29187 r29191 48 48 ####################################################################################### 49 49 sub createInputFileList { 50 my ($self ) = @_;50 my ($self, $inputFile) = @_; 51 51 52 52 my $nebPath = $self->{_gpc1Db}->getCameraStageSmfForThisDvoDb($self->{_dvoDb}, $self->{_expId}); … … 58 58 59 59 # now write the path to this file out to temp file 60 my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_inputFileList.XXXX", UNLINK => !$self->{_save_temps}); 61 print $tempFile $realFile . "\n"; 62 close $tempFile; 60 print $inputFile $realFile . "\n"; 63 61 64 return $tempName;62 return 1; 65 63 } 66 64
Note:
See TracChangeset
for help on using the changeset viewer.
