IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28852


Ignore:
Timestamp:
Aug 5, 2010, 2:10:35 PM (16 years ago)
Author:
rhenders
Message:

Simplified DVO Db args: now provide full path and it gets broken up in code

File:
1 edited

Legend:

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

    r28851 r28852  
    99use File::Temp qw(tempfile);
    1010use XML::LibXML;
     11use File::Basename;
    1112
    1213# local classes
     
    3334        'output|o=s' => \$output,
    3435        'batch|b=s' => \$batchType,
    35         'dvolocation|l=s' => \$dvoLocation,
    36         'dvodb|d=s' => \$dvoDb,
     36        'dvo|d=s' => \$fullDvoPath,
    3737        'expid|e=s' => \$singleExpId,
    3838        'product|p=s' => \$datastoreProduct,
     
    5858    print "* REQUIRED: need to define a batch type     -b <init|det|diff|stack>\n";
    5959}
    60 if (!defined $dvoDb) {
     60if (!defined $fullDvoPath) {
    6161    $quit=1;
    62     print "* REQUIRED: need to provide a DVO Db name   -d <name>\n";
    63 }
    64 if (!defined $dvoLocation) {
    65     $dvoLocation="/data/ipp037.0/gpc1/catdirs";
    66     print "* OPTIONAL: location of DVO Db              -l <location>        default = '$dvoLocation'\n";
     62    print "* REQUIRED: need to provide a DVO Db        -d <pathToDVO>\n";
    6763}
    6864if (!defined $singleExpId) {
    6965
    70     print "* OPTIONAL: a single exposure ID            -e <expID>           default = none\n";
     66    print "* OPTIONAL: a single exposure ID            -e <expID>           (default = none)\n";
    7167}
    7268if (!defined $datastoreProduct) {
    7369
    74     print "* OPTIONAL: datastore product               -p <product>         default = none (i.e. data will not be published)\n";
     70    print "* OPTIONAL: datastore product               -p <product>         (default = none, i.e. data will not be published)\n";
    7571}
    7672if (!defined $verbose) {
    7773    $verbose = 0;
    78     print "* OPTIONAL: run in verbose mode             -v                   default = $verbose\n";
     74    print "* OPTIONAL: run in verbose mode             -v                   (default = $verbose)\n";
    7975}
    8076if (!defined $save_temps) {
    8177    $save_temps = 0;
    82     print "* OPTIONAL: keep temp files                 -t                   default = $save_temps\n";
     78    print "* OPTIONAL: keep temp files                 -t                   (default = $save_temps)\n";
    8379}
    8480if (!defined $force) {
    8581    $force = 0;
    86     print "* OPTIONAL: force if already processed      -f                   default = $force\n";
     82    print "* OPTIONAL: force if already processed      -f                   (default = $force)\n";
    8783}
    8884if (!defined $dontTarNZip) {
    8985    $dontTarNZip = 0;
    90     print "* OPTIONAL: don't tar and zip output        -z                   default = $dontTarNZip\n";
     86    print "* OPTIONAL: don't tar and zip output        -z                   (default = $dontTarNZip)\n";
    9187}
    9288print "*\n*******************************************************************************\n";
    9389
    9490if ($quit) { exit; }
    95 
    96 $fullDvoPath = $dvoLocation . "/" . $dvoDb;
    9791
    9892# determine PSPS batch 'type'
     
    10397elsif ($batchType eq 'diff') {$pspsBatchType = "OB";}
    10498else {$pspsBatchType = "UNKNOWN";}
     99
     100# spilt full DVO path into Db and path
     101($dvoDb, $dvoLocation) = fileparse($fullDvoPath);
    105102
    106103my $gpc1Db = new ippToPsps::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser", $verbose, $save_temps);
Note: See TracChangeset for help on using the changeset viewer.