Changeset 27699
- Timestamp:
- Apr 15, 2010, 3:24:42 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/scripts/ippToPsps_run.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/scripts/ippToPsps_run.pl
r27669 r27699 12 12 13 13 # globals 14 my ($verbose, $save_temps, $no_op, $no_update, $camera, $product, $output, $dvodb, $label, $ no_publish);14 my ($verbose, $save_temps, $no_op, $no_update, $camera, $product, $output, $dvodb, $label, $singleExpId, $no_publish); 15 15 16 16 # TODO temporary until we use database to store current jobid … … 25 25 $camera = 'GPC1'; 26 26 $output = undef; 27 $singleExpId = undef; 27 28 28 29 # get user args 29 30 GetOptions( 30 'output=s' => \$output, 31 'product=s' => \$product, 32 'dvodb=s' => \$dvodb, 33 'label=s' => \$label, 31 'output|o=s' => \$output, 32 'product|p=s' => \$product, 33 'dvodb|d=s' => \$dvodb, 34 'label|l=s' => \$label, 35 'expid|e=s' => \$singleExpId, 34 36 'no_publish' => \$no_publish, 35 'verbose ' => \$verbose,37 'verbose|v' => \$verbose, 36 38 'save_temps' => \$save_temps, 37 39 'no-op' => \$no_op, … … 46 48 "--product <init|det|diff|stack>\n". 47 49 "--output <path>\n". 48 "--label <label> \n" .50 "--label <label> | --expid <expid>\n" . 49 51 "--dvodb <path>\n\n", 50 52 -exitval => 3 … … 53 55 defined $output and 54 56 defined $dvodb and 55 defined $label;57 ( defined $label or defined $singleExpId ); 56 58 57 59 # check we can run programs and get camera config … … 85 87 ) or die "Unable to connect to database $DBI::errstr\n"; 86 88 87 # query to retrieve all exposures with the provided label 88 my $query = 89 "SELECT DISTINCT rawExp.exp_id ". 90 "FROM camRun, chipRun, rawExp ". 91 "WHERE camRun.chip_id = chipRun.chip_id ". 92 "AND chipRun.exp_id = rawExp.exp_id ". 93 "AND camRun.label like '%$label%' ". 94 # "AND rawExp.decl >= '-0.157079633' AND rawExp.decl <= '0.157079633' ". # TODO Jim's decl range 95 "ORDER BY rawExp.exp_id ASC"; 96 89 my $query; 90 if (!$singleExpId) { 91 92 # query to retrieve all exposures with the provided label 93 $query = 94 "SELECT DISTINCT rawExp.exp_id ". 95 "FROM camRun, chipRun, rawExp ". 96 "WHERE camRun.chip_id = chipRun.chip_id ". 97 "AND chipRun.exp_id = rawExp.exp_id ". 98 "AND camRun.label like '%$label%' ". 99 # "AND rawExp.decl >= '-0.157079633' AND rawExp.decl <= '0.157079633' ". # TODO Jim's decl range 100 "ORDER BY rawExp.exp_id ASC"; 101 } 102 else { 103 104 $query = "SELECT DISTINCT exp_id FROM rawExp WHERE rawExp.exp_id = $singleExpId" 105 106 } 97 107 98 108 if ($verbose) { print"$query\n";}
Note:
See TracChangeset
for help on using the changeset viewer.
