IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 22, 2010, 12:52:36 PM (16 years ago)
Author:
rhenders
Message:

Refecting changes in Batch and DetectionBatch classes

File:
1 edited

Legend:

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

    r29106 r29196  
    77use ippToPsps::Gpc1Db;
    88use ippToPsps::IppToPspsDb;
    9 use PS::IPP::Config 1.01 qw( :standard );
     9use ippToPsps::DetectionBatch;
    1010
    1111my $camera = undef;
     
    3232    print "* REQUIRED: need to provide a batch   -b <batch>\n";
    3333}
    34 if (!defined $verbose) {
     34if (!defined $camera) {
    3535    $camera = "GPC1";
    3636    print "* OPTIONAL: select a camera                 -c                   (default = $camera)\n";
     
    5151my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps);
    5252my $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
     54my $detectionBatch = ippToPsps::DetectionBatch->existing(
     55        $camera,
     56        $gpc1Db,
     57        $singleBatch,
     58        $ippToPspsDb,
     59        "./",
     60        $verbose,
     61        $save_temps);
    5462
    5563
    56 my $batches;
    57 my $numOfBatches;
     64print $detectionBatch->getSmfFile() . "\n";
    5865
    59 if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getBatch($singleBatch, \$batches);}
    60 if ($numOfBatches < 1) {return 0;}
    61 
    62 
    63 # loop round batches
    64 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.