Index: trunk/DataCheck/QuickLook/RunStar.sh
===================================================================
--- trunk/DataCheck/QuickLook/RunStar.sh	(revision 17900)
+++ trunk/DataCheck/QuickLook/RunStar.sh	(revision 17901)
@@ -5,42 +5,40 @@
 printprocesslog "INFO starting $0"
 
-seqfile=$1
-seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
-#inpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
-inpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
-#outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/star/"`
-outpath=`dirname $seqfile | sed -e "s/sequences/star/"`
-makedir $outpath
-logfile=$outpath"/"$seqnum"-images.log"
+logfile=$1
 
 cd $mars
 
 # run star 
-printprocesslog "INFO starting star.C for sequence "$seqnum
+printprocesslog "INFO starting star_file.C for file "$2
 
-check1=`root -q -b fact/analysis/star.C\("\"$seqfile\""\,4.0\,2.5\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
+echo "root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep"
+check1=`root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep`
 
 case $check1 in
-   0)   printprocesslog "INFO star was successful for sequence "$seqnum" (check1=$check1)"
+   0)   printprocesslog "INFO star was successful for file "$2" (check1=$check1)"
         # run merpp
-        printprocesslog "INFO starting merpp.C for sequence "$seqnum
-        logfile=$outpath"/"$seqnum"-merpp.log"
+        printprocesslog "INFO starting merpp.C for file "$4
+        logfile=`echo $logfile | sed -e 's/images/merpp/g'`
         
-        check1=`root -q -b fact/analysis/merpp.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
+        echo "root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep"
+        check2=`root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep`
         
-        case $check1 in
-           0)   printprocesslog "INFO merpp was successful for sequence "$seqnum" (check1=$check1)"
+        case $check2 in
+           0)   printprocesslog "INFO merpp was successful for file "$4" (check2=$check2)"
                 ;;
-           *)   printprocesslog "ERROR merpp3.C failed for sequence "$seqnum" (check1=$check1)"
+           *)   printprocesslog "ERROR merpp_file.C failed for file "$4" -> check log "$logfile"  (check2=$check2)"
                 # delete image file in this case to be sure that ganymed doesn't try to process it
-                imgfile=$outpath"/"$seqnum"_I.root"
-                if ls $imgfile >/dev/null 2>&1
+                if ls $4 >/dev/null 2>&1
                 then
-                   rm -v $imagefile
+                   rm -v $4
                 fi
                 ;;
         esac
         ;;
-   *)   printprocesslog "ERROR star.C failed for sequence "$seqnum" (check1=$check1)"
+   *)   printprocesslog "ERROR star_file.C failed for file "$2" -> check log "$1" (check1=$check1)"
+        if ls $4 >/dev/null 2>&1
+        then
+           rm -v $4
+        fi
         ;;
 esac
