Changeset 29193
- Timestamp:
- Sep 22, 2010, 9:15:55 AM (16 years ago)
- Location:
- trunk/ippToPsps/perl
- Files:
-
- 2 edited
-
ippToPsps/Gpc1Db.pm (modified) (3 diffs)
-
makeDetections.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/perl/ippToPsps/Gpc1Db.pm
r28877 r29193 90 90 ########################################################################### 91 91 sub getExposureListFromDvoDb { 92 my ($self, $dvoDb, $exposures) = @_; 92 my ($self, $dvoDb, $exposures, $lastExposure) = @_; 93 94 if (!defined $lastExposure) {$lastExposure = 0;} 93 95 94 96 my $query = $self->{_db}->prepare(<<SQL); … … 100 102 WHERE addRun.dvodb LIKE '$dvoDb' 101 103 AND addRun.state = 'full' 104 AND rawExp.exp_id > $lastExposure 102 105 ORDER BY exp_id ASC; 103 106 SQL 104 107 105 #AND rawExp.exp_id > 133887106 #AND filter = 'r.00000'107 #AND rawExp.dateobs <= '2010-03-12'108 #AND rawExp.exp_id > $lastExpId109 #AND camRun.label LIKE '%$label%'110 #AND rawExp.exp_id > 136561111 #AND camRun.dist_group LIKE 'sas'112 108 #AND rawExp.decl >= '-0.157079633' AND rawExp.decl <= '0.157079633' Jims Dec range 113 109 … … 115 111 ${$exposures} = $query->fetchall_arrayref(); 116 112 my $numOfExposures = scalar @{${$exposures}}; 117 if ($numOfExposures > 0) {118 119 print "* Found $numOfExposures exposures in DVO Db '$dvoDb'\n";120 return 1;121 }122 113 123 print "* No exposures found in DVO Db '$dvoDb'\n"; 124 return 0; 114 # message 115 if ($numOfExposures) {print "* Found $numOfExposures exposures";} 116 else { print "* No exposures found"; } 117 print " in DVO Db '$dvoDb' (counting from exposure $lastExposure)\n"; 118 119 return ($numOfExposures) ? 1 : 0; 125 120 } 126 121 -
trunk/ippToPsps/perl/makeDetections.pl
r29188 r29193 21 21 my $output = undef; 22 22 my $singleExpId = undef; 23 my $lastExpId = undef; 23 24 my $datastoreProduct = undef; 24 25 my $force = undef; … … 33 34 'dvolocation|l=s' => \$dvoPath, 34 35 'expid|e=s' => \$singleExpId, 36 'lastexpid|x=s' => \$lastExpId, 35 37 'product|p=s' => \$datastoreProduct, 36 38 'verbose|v' => \$verbose, … … 66 68 $singleExpId = -1; 67 69 print "* OPTIONAL: a single exposure ID -e <expID> (default = none)\n"; 70 } 71 if (!defined $lastExpId) { 72 $lastExpId = 0; 73 print "* OPTIONAL: process from last exp ID -x <expID> (default = $lastExpId)\n"; 68 74 } 69 75 if (!defined $datastoreProduct) { … … 107 113 else { 108 114 109 if (!$gpc1Db->getExposureListFromDvoDb($dvoDb, \$exposures )) {exit;}115 if (!$gpc1Db->getExposureListFromDvoDb($dvoDb, \$exposures, $lastExpId)) {exit;} 110 116 } 111 117
Note:
See TracChangeset
for help on using the changeset viewer.
