IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2010, 5:36:58 PM (16 years ago)
Author:
Paul Price
Message:

Allow use of data_group.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/microtest.pl

    r27443 r27572  
    1616my ($db_host, $db_name, $db_user, $db_pw); # Database details
    1717my ($label);                               # Label of interest
     18my ($group);                               # Data group
    1819my ($verbose);                             # Verbosity?
    1920my ($save_temps);                          # Save temporary outputs?
     
    2526           'dbpass=s' => \$db_pw, # Database p/w
    2627           'label=s' => \$label, # Label of interest
     28    'data_group=s' => \$group,   # Data group
    2729           'verbose' => \$verbose, # Verbosity?
    2830    'save-temps' => \$save_temps,  # Save temporary outputs?
     
    4648
    4749# Exposures of interest
    48 my $exps = $db->selectall_arrayref(
    49     "SELECT DISTINCT exp_id, exp_name, magic_id, magicRun.workdir AS magic_path, camProcessedExp.path_base AS cam_path FROM magicRun JOIN rawExp USING(exp_id) JOIN diffRun USING(diff_id) JOIN diffInputSkyfile USING(diff_id) JOIN warpRun ON warpRun.warp_id = diffInputSkyfile.warp1 JOIN fakeRun USING(fake_id) JOIN camProcessedExp USING(cam_id) WHERE magicRun.label = '$label' AND magicRun.state = 'full'",
    50     { Slice => {} }
    51     ) or die "Unable to execute SQL: $DBI::errstr";
     50my $sql = "SELECT DISTINCT exp_id, exp_name, magic_id, magicRun.workdir AS magic_path, camProcessedExp.path_base AS cam_path FROM magicRun JOIN rawExp USING(exp_id) JOIN diffRun USING(diff_id) JOIN diffInputSkyfile USING(diff_id) JOIN warpRun ON warpRun.warp_id = diffInputSkyfile.warp1 JOIN fakeRun USING(fake_id) JOIN camProcessedExp USING(cam_id) WHERE magicRun.label = '$label' AND magicRun.state = 'full'";
     51$sql .= " AND magicRun.data_group = '$group'" if defined $group;
     52my $exps = $db->selectall_arrayref($sql, { Slice => {} }) or die "Unable to execute SQL: $DBI::errstr";
     53
     54$label = $group if defined $group;
    5255
    5356foreach my $exp (@$exps) {
Note: See TracChangeset for help on using the changeset viewer.