IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 5, 2010, 12:57:46 PM (16 years ago)
Author:
rhenders
Message:

DVO db, datastore product and min and max object IDs are now stored in the database; batch type in Db is now PSPS-stype batch type (eg 'P2'); survey ID is now IPP's (eg SAS)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/ippToPsps_run.pl

    r28849 r28850  
    103103$fullDvoPath = $dvoPath . "/" . $dvoDb;
    104104
     105# determine PSPS batch 'type'
     106my $pspsBatchType;
     107if ($batchType eq 'init') {$pspsBatchType = "IN";}
     108elsif ($batchType eq 'det') {$pspsBatchType = "P2";}
     109elsif ($batchType eq 'stack') {$pspsBatchType = "ST";}
     110elsif ($batchType eq 'diff') {$pspsBatchType = "OB";}
     111else {$pspsBatchType = "UNKNOWN";}
     112
    105113my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps);
    106114my $ippToPspsDb = new ippToPsps::IppToPspsDb("ippToPsps", "ippdb01", "ipp", "ipp", $verbose, $save_temps);
     
    181189        if (!$surveyType) {next;}
    182190
    183         $batchId = $ippToPspsDb->getNewBatchId($expId, $surveyType, $batchType);
     191        $batchId = $ippToPspsDb->createNewBatch($expId, $distGroup, $pspsBatchType, $dvoDb, (defined $datastoreProduct) ? $datastoreProduct : "NONE");
    184192
    185193        # TODO quit here if no sensible batch ID
     
    208216            }
    209217
    210             $ippToPspsDb->updateDb($batchId, $expId, 1, $published, $totalDetections);
     218            $ippToPspsDb->updateBatch($batchId, $expId, 1, $published, $totalDetections, $minObjId, $maxObjId);
    211219        }
    212220
     
    361369    my $timeStamp = sprintf "%4d-%02d-%02d %02d:%02d:%02d", $year+1900,$mon+1,$mday,$hour,$min,$sec;
    362370
    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 
    371371    # create XML file
    372372    my $writer = new XML::Writer(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT=>2);
     
    403403                $writer->startTag('manifest',
    404404                        "name" => "$batch",
    405                         "type" => $type,
     405                        "type" => $pspsBatchType,
    406406                        "survey" => $pspsSurvey,
    407407                        "timestamp" => "$timeStamp",
     
    413413                $writer->startTag('manifest',
    414414                        "name" => "$batch",
    415                         "type" => $type,
     415                        "type" => $pspsBatchType,
    416416                        "timestamp" => "$timeStamp");
    417417            }
Note: See TracChangeset for help on using the changeset viewer.