Index: /trunk/DataCheck/CheckRawData.sh
===================================================================
--- /trunk/DataCheck/CheckRawData.sh	(revision 12984)
+++ /trunk/DataCheck/CheckRawData.sh	(revision 12985)
@@ -23,13 +23,4 @@
 # setup to use ftools
 source $HEADAS/headas-init.sh
-
-pwfile=`dirname $0`/.pw
-password=`cat $pwfile 2>/dev/null`
-if [ "$password" == "" ]
-then
-   echo "please insert password in $pwfile"
-   printprocesslog "ERROR password for DB access in $pwfile missing"
-   finish
-fi
 
 # check if software is available
@@ -91,15 +82,7 @@
       origfile=`echo $rawfile | sed -e 's/loc_data/daq/'`
 
-      # check if raw file was changed in the last 30 minutes
-      isnew=`find $file -cmin -30`
-      if [ "$isnew" != "" ]
-      then
-         printprocesslog "INFO "$file" is not older than 30 min. -> continue"
-         continue
-      fi
-
       # check if it is drs file
-      isnew=`ls $file | grep drs`
-      if [ "$isnew" != "" ]
+      isdrs=`ls $file | grep drs`
+      if [ "$isdrs" != "" ]
       then
          printprocesslog "INFO "$file" is a drs file. -> continue"
@@ -111,4 +94,12 @@
       if [ -e $origfile ]
       then
+         # check if raw file was changed in the last 30 minutes
+         isnew=`find $origfile -cmin -30`
+         if [ "$isnew" != "" ]
+         then
+            printprocesslog "WARN "$origfile" is not older than 30 min. -> continue"
+            continue
+         fi
+
          # get time of last modification as seconds since Epoch for both files
          timeorig=`stat -c %Y $origfile`
@@ -330,4 +321,6 @@
       if [ "$result3" == "" ]
       then 
+         query="INSERT RawFileAvailISDC SET fNight="$runnumber", fRunID="$filenumberfromname
+         sendquery >/dev/null
          query="INSERT"
          querymid=" fNight="$runnumber", fRunID="$filenumberfromname", "
@@ -409,12 +402,6 @@
       query=$query", fFitsFileErrors="$numfitserrors
       query=$query" "$querystop
-      printprocesslog "INFO insert/update entry in DB. QUERY: "$query
       # send query to DB
       sendquery >/dev/null
-      #if ! /usr/bin/mysql -u operator --host=fact01.fact.local --password=$password FactData -e "$query4"
-      #then
-      #   printprocesslog "ERROR insert/update of "$numfromfile" to mysql failed."
-      #   finish
-      #fi
    done
 done
