Index: trunk/DataCheck/QuickLook/RunCallisto.sh
===================================================================
--- trunk/DataCheck/QuickLook/RunCallisto.sh	(revision 17901)
+++ trunk/DataCheck/QuickLook/RunCallisto.sh	(revision 17902)
@@ -5,12 +5,7 @@
 printprocesslog "INFO starting $0"
 
-seqfile=$1
-seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
-#outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
-outpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
-makedir $outpath
-logfile=$outpath"/"$seqnum"-calibration.log"
+logfile=$2
 
-# make sure that no other RunCallisto.sh is started for this seq
+# make sure that no other RunCallisto.sh is started for this run
 touch $logfile
 
@@ -28,14 +23,40 @@
 done
 
-# run callisto 
-printprocesslog "INFO starting callisto.C for sequence "$seqnum
-
-check1=`root -q -b fact/analysis/callisto.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
+case $1 in
+   drun) # process data run
+         # run callisto 
+         echo "fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile "
+         check1=`root -q -b fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile | intgrep`
+         ;;
+   prun) # process pedestal run
+         echo "fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
+         check1=`root -q -b fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
+         ;;
+   crun) # process light-pulser run
+         echo "fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile "
+         check1=`root -q -b fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile | intgrep`
+         ;;
+   time) # do drs-calib
+         echo "fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
+         check1=`root -q -b fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
+         ;;
+   *) # default
+         printprocesslog "WARN wrong parameter given to script RunCallisto.sh :"$1
+         ;;
+esac
 
 case $check1 in
-   0)   printprocesslog "INFO callisto was successful for sequence "$seqnum" (check1=$check1)"
-        `dirname $0`/RunStar.sh $seqfile &
+   0)   printprocesslog "INFO callisto was successful for file "$3" (check1=$check1)"
+        if [ "$1" == "drun" ]
+        then
+           printprocesslog "INFO start RunStar.sh for file "$7
+           starfile=`echo $7 | sed -e 's/callisto/star/g' -e 's/_C/_I/'`
+           starlog=`echo $starfile | sed -e 's/_I.root/-images.log/'`
+           outpath=`dirname $starfile`
+           makedir $outpath
+           `dirname $0`/RunStar.sh $starlog $7 $outpath $starfile
+        fi
         ;;
-   *)   printprocesslog "ERROR callisto.C failed for sequence "$seqnum" (check1=$check1)"
+   *)   printprocesslog "ERROR callisto failed for file "$3" (check1=$check1)"
         ;;
 esac
