Changeset 29196 for trunk/ippToPsps/perl/getSmfForThisBatch.pl
- Timestamp:
- Sep 22, 2010, 12:52:36 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/perl/getSmfForThisBatch.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/perl/getSmfForThisBatch.pl
r29106 r29196 7 7 use ippToPsps::Gpc1Db; 8 8 use ippToPsps::IppToPspsDb; 9 use PS::IPP::Config 1.01 qw( :standard );9 use ippToPsps::DetectionBatch; 10 10 11 11 my $camera = undef; … … 32 32 print "* REQUIRED: need to provide a batch -b <batch>\n"; 33 33 } 34 if (!defined $ verbose) {34 if (!defined $camera) { 35 35 $camera = "GPC1"; 36 36 print "* OPTIONAL: select a camera -c (default = $camera)\n"; … … 51 51 my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps); 52 52 my $ippToPspsDb = new ippToPsps::IppToPspsDb("ippToPsps", "ippdb01", "ipp", "ipp", $verbose, $save_temps); 53 my $ipprc = PS::IPP::Config->new($camera) or (warn "Can't get camera configuration" and exit($PS_EXIT_CONFIG_ERROR)); 53 54 my $detectionBatch = ippToPsps::DetectionBatch->existing( 55 $camera, 56 $gpc1Db, 57 $singleBatch, 58 $ippToPspsDb, 59 "./", 60 $verbose, 61 $save_temps); 54 62 55 63 56 my $batches; 57 my $numOfBatches; 64 print $detectionBatch->getSmfFile() . "\n"; 58 65 59 if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getBatch($singleBatch, \$batches);}60 if ($numOfBatches < 1) {return 0;}61 62 63 # loop round batches64 my $batch;65 my $numChecked = 0;66 foreach $batch ( @{$batches} ) {67 my ($timestamp, $expId, $batchId, $surveyType, $deleted, $dvoDb, $processed, $onDatastore, $loadedToOdm, $mergeWorthy, $merged) = @{$batch};68 69 print "* found $timestamp, $expId, $batchId, $surveyType, $deleted $dvoDb\n";70 71 my $nebPath = $gpc1Db->getCameraStageSmfForThisDvoDb($dvoDb, $expId);72 if (!$nebPath) { print "* Could not determind neb path for SMF\n"; exit; }73 74 # get real filename from neb 'key'75 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT",$nebPath) or return 0;76 my $realFile = $ipprc->file_resolve($fpaObjects) or return 0;77 78 print "$realFile\n";79 80 }81 82
Note:
See TracChangeset
for help on using the changeset viewer.
