Index: trunk/DataCheck/QuickLook/Step1.sh
===================================================================
--- trunk/DataCheck/QuickLook/Step1.sh	(revision 17152)
+++ trunk/DataCheck/QuickLook/Step1.sh	(revision 17153)
@@ -100,5 +100,5 @@
 printprocesslog "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
 
-while [ ${#fileslocal[@]} -ne ${#files[@]} ] || [ $numdataruns -ne ${#callistofiles[@]} ]
+while [ ${#fileslocal[@]} -ne ${#files[@]} ] || [ $numdataruns -ne ${#callistofiles[@]} ] || [ ${#callistofiles[@]} -eq 0 ]
 do
    # only continue with script 
@@ -238,17 +238,17 @@
             printprocesslog "INFO counting callisto logs and data files +1."
             # get number of callisto logs
-            callistocount=`ps aux | grep RunCallisto | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
+            runcallistocount=`ps aux | grep RunCallisto | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
             # count data runs
             numdataruns=`echo " $numdataruns + 1 " | bc -l`
             #echo "numdata +1"
             
-            #echo "cal: "$callistocount" numdat: "$numdataruns" numcallog: "${#callistofiles[@]}
-            printprocesslog "INFO running callistos: "$callistocount" #data-runs: "$numdataruns" #callisto-logs: "${#callistofiles[@]}
+            #echo "cal: "$runcallistocount" numdat: "$numdataruns" numcallog: "${#callistofiles[@]}
+            printprocesslog "INFO running callistos: "$runcallistocount" #data-runs: "$numdataruns" #callisto-logs: "${#callistofiles[@]}
             # do not overload system in case of a lot of files to be processed
-            #  callistocount is set in setup.fact.lp.data
-            if [ $callistocount -ge $numcallistos ]
-            then
-               printprocesslog "INFO "$callistocount" RunCallisto.sh are running -> continue"
-               #echo "INFO "$callistocount" RunCallisto.sh are running -> continue"
+            #  numruncallistos is set in setup.fact.lp.data
+            if [ $runcallistocount -ge $numruncallistos ]
+            then
+               printprocesslog "INFO "$runcallistocount" RunCallisto.sh are running -> continue"
+               #echo "INFO "$runcallistocount" RunCallisto.sh are running -> continue"
                continue
             fi
@@ -318,5 +318,5 @@
       fi
    done
-   printprocesslog "INFO status after loop: "$callistocount" callistos running, "$numdataruns" data runs to process in total, "${#callistofiles[@]}" have already a callisto-logfile "
+   printprocesslog "INFO status after loop: "$runcallistocount" callistos running, "$numdataruns" data runs to process in total, "${#callistofiles[@]}" have already a callisto-logfile "
    
    # get new file lists
