IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19716


Ignore:
Timestamp:
Sep 23, 2008, 2:53:09 PM (18 years ago)
Author:
Paul Price
Message:

Adding search on label.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_serial_mops.pl

    r18536 r19716  
    3131     $outroot,                  # Output directory
    3232     $fileset,                  # File set
     33     $label,                    # Data label to search for
    3334     $verbose,                  # Verbose output?
    3435     $no_update,                # Don't update state?
     
    4546           'outroot=s'  => \$outroot,
    4647           'fileset=s'  => \$fileset,
     48           'label=s'    => \$label,
    4749           'verbose'    => \$verbose,
    4850           'no-update'  => \$no_update, # Don't update the database?
     
    6971    die "Unable to connect to database: $DBI::errstr";
    7072
    71 my $sql = "SELECT exp_id, diff_id, skycell_id, warp_id, diffSkyfile.path_base AS diff_path_base, warpSkyfile.path_base AS warp_path_base FROM diffSkyfile JOIN diffRun using(diff_id) JOIN diffInputSkyfile USING(diff_id,tess_id,skycell_id) JOIN warpRun USING(warp_id,tess_id) JOIN warpSkyfile USING(warp_id,skycell_id,tess_id) JOIN fakeRun using(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE diffSkyfile.fault = 0 AND rawExp.camera = \'$camera\';";
     73my $sql = "SELECT exp_id, diff_id, skycell_id, warp_id, diffSkyfile.path_base AS diff_path_base, warpSkyfile.path_base AS warp_path_base FROM diffSkyfile JOIN diffRun using(diff_id) JOIN diffInputSkyfile USING(diff_id,tess_id,skycell_id) JOIN warpRun USING(warp_id,tess_id) JOIN warpSkyfile USING(warp_id,skycell_id,tess_id) JOIN fakeRun using(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE diffSkyfile.fault = 0 AND rawExp.camera = \'$camera\'";
     74$sql .= " AND diffRun.label = \'$label\'" if defined $label;
     75$sql .= ';';
    7276
    7377my $rows = $db->selectall_arrayref( $sql, { Slice => {} } ) or die "Unable to execute SQL: $DBI::errstr";
     
    106110    }
    107111
    108     # format: filename|filesize|md5sum|filetype| 
     112    # format: filename|filesize|md5sum|filetype|
    109113    # note: since we omit filesize and md5sum, dsreg will calculate them
    110114    print $dsFile "${output}|||ipp-mops|\n";
Note: See TracChangeset for help on using the changeset viewer.