Index: trunk/ippToPsps/jython/scratchdb.py
===================================================================
--- trunk/ippToPsps/jython/scratchdb.py	(revision 33155)
+++ trunk/ippToPsps/jython/scratchdb.py	(revision 33160)
@@ -196,5 +196,5 @@
             rs.first()
             if rs.getInt(1) > 0:
-                self.logger.errorPair("Already imported up-to-date version of",  path)
+                self.logger.debugPair("Already imported up-to-date version of",  path)
                 return True
             else:
@@ -219,4 +219,43 @@
         self.execute(sql)
         
+    '''
+    Gets total size of DVO files imported to this database
+    Counts only cpm and cpt files
+    '''
+    def getTotalSizeOfIngestedDvoFiles(self):
+
+        sql = "SELECT SUM(size) FROM " + self.dvoDoneTable + " where path LIKE '%cpm' OR path LIKE '%cpt'"
+        try:
+            rs = self.executeQuery(sql)  
+            rs.first()
+            size = rs.getLong(1)
+        except:
+            self.logger.errorPair("Unable to get total ingested DVO size", sql)
+
+        return size
+
+    '''
+    Checks whether DVO files we have ingested are form the DVO path provided
+    '''
+    def isThisDvoCurrentlyIngested(self, path):
+
+        sql = "SELECT path FROM " + self.dvoDoneTable + " where path LIKE '%Images.dat'"
+        try:
+            rs = self.executeQuery(sql)  
+            rs.first()
+
+            head,tail = os.path.split(rs.getString(1))
+
+            if head == path: 
+                self.logger.infoPair("Already ingested stuff from DVO at", path)
+                return True
+            else: 
+                self.logger.errorPair("DVO does not match. We have", head)
+                return False
+
+        except:
+            self.logger.errorPair("No DVO files ingested for this path", path)
+            return False
+
     '''
     Checks whether the astrometric solution is ok for this chip
