Changeset 28850 for trunk/ippToPsps/perl/ippToPsps_run.pl
- Timestamp:
- Aug 5, 2010, 12:57:46 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/perl/ippToPsps_run.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/perl/ippToPsps_run.pl
r28849 r28850 103 103 $fullDvoPath = $dvoPath . "/" . $dvoDb; 104 104 105 # determine PSPS batch 'type' 106 my $pspsBatchType; 107 if ($batchType eq 'init') {$pspsBatchType = "IN";} 108 elsif ($batchType eq 'det') {$pspsBatchType = "P2";} 109 elsif ($batchType eq 'stack') {$pspsBatchType = "ST";} 110 elsif ($batchType eq 'diff') {$pspsBatchType = "OB";} 111 else {$pspsBatchType = "UNKNOWN";} 112 105 113 my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps); 106 114 my $ippToPspsDb = new ippToPsps::IppToPspsDb("ippToPsps", "ippdb01", "ipp", "ipp", $verbose, $save_temps); … … 181 189 if (!$surveyType) {next;} 182 190 183 $batchId = $ippToPspsDb-> getNewBatchId($expId, $surveyType, $batchType);191 $batchId = $ippToPspsDb->createNewBatch($expId, $distGroup, $pspsBatchType, $dvoDb, (defined $datastoreProduct) ? $datastoreProduct : "NONE"); 184 192 185 193 # TODO quit here if no sensible batch ID … … 208 216 } 209 217 210 $ippToPspsDb->update Db($batchId, $expId, 1, $published, $totalDetections);218 $ippToPspsDb->updateBatch($batchId, $expId, 1, $published, $totalDetections, $minObjId, $maxObjId); 211 219 } 212 220 … … 361 369 my $timeStamp = sprintf "%4d-%02d-%02d %02d:%02d:%02d", $year+1900,$mon+1,$mday,$hour,$min,$sec; 362 370 363 # determine batch 'type'364 my $type;365 if ($batchType eq 'init') {$type = "IN";}366 elsif ($batchType eq 'det') {$type = "P2";}367 elsif ($batchType eq 'stack') {$type = "ST";}368 elsif ($batchType eq 'diff') {$type = "OB";}369 else {$type = "UNKNOWN";}370 371 371 # create XML file 372 372 my $writer = new XML::Writer(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT=>2); … … 403 403 $writer->startTag('manifest', 404 404 "name" => "$batch", 405 "type" => $ type,405 "type" => $pspsBatchType, 406 406 "survey" => $pspsSurvey, 407 407 "timestamp" => "$timeStamp", … … 413 413 $writer->startTag('manifest', 414 414 "name" => "$batch", 415 "type" => $ type,415 "type" => $pspsBatchType, 416 416 "timestamp" => "$timeStamp"); 417 417 }
Note:
See TracChangeset
for help on using the changeset viewer.
