Index: /trunk/tools/checkexp
===================================================================
--- /trunk/tools/checkexp	(revision 38088)
+++ /trunk/tools/checkexp	(revision 38089)
@@ -53,5 +53,6 @@
         summitExp.fault AS summit_fault, 
         pzDownloadExp.state AS download_state, count(pzDownloadImfile.class_id) AS download_count,
-        newExp.state AS newExp_state, newExp.exp_id
+        newExp.state AS newExp_state, newExp.exp_id,
+        rawExp.state as rawExp_state
         FROM summitExp LEFT JOIN pzDownloadExp USING(exp_name) 
             LEFT JOIN pzDownloadImfile USING(exp_name) 
@@ -88,4 +89,6 @@
 my $first_exp_id;
 my $first_exp_name;
+my $last_registered_exp_id = "";
+my $last_registered_exp_name = "";
 while (my $se_ref = $se_stmt->fetchrow_hashref()) {
     push @summit_exps, $se_ref;
@@ -98,4 +101,5 @@
     my $imfiles = $se_ref->{imfiles};
     my $dateobs = $se_ref->{dateobs};
+    my $raw_state = $se_ref->{rawExp_state};
     if ($summit_fault) {
         push @summit_faults, $se_ref;
@@ -115,4 +119,8 @@
             $last_new_exp_id = $exp_id;
             $last_new_exp_name = $exp_name;
+        }
+        if ($raw_state and $raw_state eq 'full') {
+            $last_registered_exp_id = $exp_id;
+            $last_registered_exp_name = $exp_name;
         }
     }
@@ -180,4 +188,6 @@
 
 print "first exposure:  $first_exp_name $first_exp_id\n";
+print "last registered: $last_registered_exp_name $last_registered_exp_id\n" 
+            if $last_registered_exp_id ne $last_exp_id;
 print "last copied:     $last_new_exp_name $last_new_exp_id\n"
             if $last_new_exp_id ne $last_exp_id;
