Index: trunk/ippToPsps/perl/makeDetections.pl
===================================================================
--- trunk/ippToPsps/perl/makeDetections.pl	(revision 29188)
+++ trunk/ippToPsps/perl/makeDetections.pl	(revision 29193)
@@ -21,4 +21,5 @@
 my $output = undef;
 my $singleExpId = undef;
+my $lastExpId = undef;
 my $datastoreProduct = undef;
 my $force = undef;
@@ -33,4 +34,5 @@
         'dvolocation|l=s' => \$dvoPath,
         'expid|e=s' => \$singleExpId,
+        'lastexpid|x=s' => \$lastExpId,
         'product|p=s' => \$datastoreProduct,
         'verbose|v' => \$verbose,
@@ -66,4 +68,8 @@
     $singleExpId = -1;
     print "* OPTIONAL: a single exposure ID            -e <expID>           (default = none)\n";
+}
+if (!defined $lastExpId) {
+    $lastExpId = 0;
+    print "* OPTIONAL: process from last exp ID        -x <expID>           (default = $lastExpId)\n";
 }
 if (!defined $datastoreProduct) {
@@ -107,5 +113,5 @@
 else {
 
-    if (!$gpc1Db->getExposureListFromDvoDb($dvoDb, \$exposures)) {exit;}
+    if (!$gpc1Db->getExposureListFromDvoDb($dvoDb, \$exposures, $lastExpId)) {exit;}
 }
 
