Index: trunk/DataCheck/QuickLook/Step3.sh
===================================================================
--- trunk/DataCheck/QuickLook/Step3.sh	(revision 17109)
+++ trunk/DataCheck/QuickLook/Step3.sh	(revision 17110)
@@ -4,10 +4,6 @@
 printprocesslog "INFO starting $0 $1"
 
-#root=/opt/root_svn/bin/thisroot.sh
-#source $root
-#factpath=/home/fact/FACT++.in-run-fad-loss
 export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
 
-mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.29
 cd $mars
 
@@ -41,23 +37,15 @@
 fi
 
-# get current hour
-hour=`date +%k`
-if [ $hour -le 7 ] || [ $hour -ge 19 ]
+
+# get dates
+if [ "$certaindate" != "" ]
 then
-   dates=( `date +%Y/%m/%d --date="-12hour"` )
+   getdates $certaindate
 else
-   # 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"` \
-           )
-fi
-#dates=( `find -L $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
-
-#dates=( "2013/08/31" )
-
-# source info on daq in /loc_data/analysis/sources.txt 
-#    (dump of DB scheduling.sources)
-
+   # get all night
+   #getdates "all"
+   # get last 6 nights if hour between 7 and 19h, else only current night
+   getdates 6 7 19
+fi
 
 #echo ${dates[@]}
