Index: /trunk/DataCheck/Processing/FillAuxCtrDev.sh
===================================================================
--- /trunk/DataCheck/Processing/FillAuxCtrDev.sh	(revision 17088)
+++ /trunk/DataCheck/Processing/FillAuxCtrDev.sh	(revision 17089)
@@ -1,7 +1,11 @@
 #!/bin/bash
 
-# option 
-doupdate="yes" # update all entries (needed when new fields have been added)
-doupdate="no" # fill only entries which are not yet existing (default)
+# option whether to fill all row or only those where information is missing
+# $doupdate might be given as environment variable
+if [ "$doupdate" = "" ]
+then
+   doupdate="yes" # update all entries (needed when new fields have been added)
+   doupdate="no" # fill only entries which are not yet existing (default)
+fi
 
 source `dirname $0`/../Sourcefile.sh
@@ -21,11 +25,15 @@
 fi
 
+# get dates
+if [ "$certaindate" != "" ]
+then
+   getdates $certaindate
+else
+   # get all night
+   #getdates "all"
+   # get last 6 nights
+   getdates 6
+fi
 
-# get last 3, 6 or 9 nights
-dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
-#        `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
-#        `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
-        )
-dates=( `find -L $ziprawdata -mindepth 3 -type d | sort | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
 printprocesslog "INFO processing the following night(s): "${dates[@]}
 echo  `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
@@ -133,5 +141,5 @@
       if [ -e $trackingfile ] && [ $tracknumerrors -eq 0 ]
       then 
-         ctrldevs=( `root -q -b -l fact/ctrldev.C\("\"$trackingfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
+         ctrldevs=( `root -q -b -l fact/processing/ctrldev.C\("\"$trackingfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )
          if [ "${ctrldevs[0]}" == "" ]
          then 
@@ -154,5 +162,4 @@
       query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum
       
-      echo $query
       # send query to DB
       sendquery >/dev/null
