Index: trunk/MagicSoft/Mars/scripts/dospectrum
===================================================================
--- trunk/MagicSoft/Mars/scripts/dospectrum	(revision 8473)
+++ trunk/MagicSoft/Mars/scripts/dospectrum	(revision 8482)
@@ -151,24 +151,24 @@
 for (( i=0 ; i < $par3num ; i++ ))
 do 
-  for (( j=0 ; j < $par1num ; j++ ))
-  do 
-#     echo "i: $i - j: $j ------- par1: $val1 and par3: $val3"
-     dir=$resultpath/set${val1}_${val3}
-     if ! ls $dir >/dev/null 2>&1
-     then 
-        mkdir -pv $dir
-     fi
-#     rcfile=$dir/ganymed_${val1}_${val3}_onoff.rc
-     rcfile=$dir/`basename $ganymedrc` 
-     if ! ls $rcfile >/dev/null 2>&1
-     then 
-        cat $ganymedrc | sed -e s/"${par1}"/"   ${val1}"/ -e s/"${par3}"/"  ${val3}"/ > $rcfile
-     else
-        echo "rcfile $rcfile already exists"
-     fi
-     val1=`echo $val1 + $par1step | bc`
-  done
-  val3=`echo $val3 + $par3step | bc`
-  val1=$start1
+   for (( j=0 ; j < $par1num ; j++ ))
+   do 
+#      echo "i: $i - j: $j ------- par1: $val1 and par3: $val3"
+      dir=$resultpath/set${val1}_${val3}
+      if ! ls $dir >/dev/null 2>&1
+      then 
+         mkdir -pv $dir
+      fi
+#      rcfile=$dir/ganymed_${val1}_${val3}_onoff.rc
+      rcfile=$dir/`basename $ganymedrc` 
+      if ! ls $rcfile >/dev/null 2>&1
+      then 
+         cat $ganymedrc | sed -e s/"${par1}"/"   ${val1}"/ -e s/"${par3}"/"  ${val3}"/ > $rcfile
+      else
+         echo "rcfile $rcfile already exists"
+      fi
+      val1=`echo $val1 + $par1step | bc`
+   done
+   val3=`echo $val3 + $par3step | bc`
+   val1=$start1
 done
 
Index: trunk/MagicSoft/Mars/scripts/makemovie
===================================================================
--- trunk/MagicSoft/Mars/scripts/makemovie	(revision 8473)
+++ trunk/MagicSoft/Mars/scripts/makemovie	(revision 8482)
@@ -25,8 +25,17 @@
 # ========================================================================
 #
-#
-#
 ##############################################################################
 #
+# This script runs callisto with the -movie option and the corresponding 
+# rc files for a given sequence. 
+# The following movies are produced:
+# - movieSequenceNumber[mc]-withoutcut.mpg (all events)
+# - movieSequenceNumber[mc]-qualcut.mpg    (events after quality cuts)
+# - movieSequenceNumber[mc]-areacut.mpg    (events after area cut)
+# - movieSequenceNumber[mc]-thetacut.mpg   (events after theta^2 cut)
+# 
+# If no outpath is given, the movies are stored in the directory movies.
+# 
+# The script has to be executed in the Mars directory. 
 # 
 ##############################################################################
@@ -43,9 +52,4 @@
 NumEvents=500
 Threshold=3
-
-#MFEvtNumber.FileName: ganymed00001218.root
-#MFEvtNumber.Selector: ThetaSquared.fVal<0.04 && DataType.fVal>0.5
-#MMovieWrite.Filename: movie-00071431-off-all.mpg
-
 
 function usage()
@@ -83,26 +87,26 @@
 do 
    case $1 in 
-           --sequ)  shift
-                    sequence=$1
-                    ;;
-            --out)  shift
-                    outpath=$1
-                    ;;
-  --target-length)  shift
-                    TargetLength=$1
-                    ;;
-     --num-events)  shift
-                    NumEvents=$1
-                    ;;
-          -wobble)  wobble='yes'
-                    ;;
-              -mc)  mc='mc'
-                    ;;
-               -h)  usage
-                    ;;
-      *)      echo "unknown option $1 "
-              usage
-              exit
-              ;;
+               --sequ)  shift
+                        sequence=$1
+                        ;;
+                --out)  shift
+                        outpath=$1
+                        ;;
+      --target-length)  shift
+                        TargetLength=$1
+                        ;;
+         --num-events)  shift
+                        NumEvents=$1
+                        ;;
+              -wobble)  wobble='yes'
+                        ;;
+                  -mc)  mc='mc'
+                        ;;
+                   -h)  usage
+                        ;;
+                *)      echo "unknown option $1 "
+                        usage
+                        exit
+                        ;;
    esac
    shift
@@ -239,7 +243,7 @@
 for (( i=1 ; i < 4 ; i++ )) 
 do
-  command="./callisto $opts --config=$outpath2/callisto_$n8$mc-${names[$i]}.rc "
-  echo "submitting: "$command 
-  condor_run $command &
+   command="./callisto $opts --config=$outpath2/callisto_$n8$mc-${names[$i]}.rc "
+   echo "submitting: "$command 
+   condor_run $command &
 done
 
Index: trunk/MagicSoft/Mars/scripts/processsequence
===================================================================
--- trunk/MagicSoft/Mars/scripts/processsequence	(revision 8473)
+++ trunk/MagicSoft/Mars/scripts/processsequence	(revision 8482)
@@ -20,5 +20,5 @@
 #   Author(s): Daniela Dorner  10/2006 <mailto:dorner@astro.uni-wuerzburg.de>
 #
-#   Copyright: MAGIC Software Development, 2000-2006
+#   Copyright: MAGIC Software Development, 2000-2007
 #
 #
@@ -80,5 +80,5 @@
           echo ""
           ;;
-     [1-9]|[0-9][0-9]|1[0-1][0-9]|12[0-7])
+      [1-9]|[0-9][0-9]|1[0-1][0-9]|12[0-7])
           echo -n "ERROR@$HOSTNAME: $program returned $check - please check the logfile $logfile"
           if [ "$program" == "callisto" ]
@@ -229,7 +229,11 @@
       mkdir -pv $merpplogpath
 
+      date=`date --date \`basename $calfile | cut -d_ -f1 +%Y/%m/%d\``
+      ccpath=$subsystempath/cc/$date
+      cacopath=$subsystempath/caco/$date
       runno=`echo $calfile | cut -d_ -f2 | sed -e 's/^0//' | sed -e 's/^0//' | sed -e 's/^0//' `
-      ccfile=`find /magic/subsystemdata/cc/ -name 20[0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep`
-      cacofile=`find /magic/subsystemdata/caco/ -name dc_20[0-2][0-9]_[01][0-9]_[0-3][0-9]_*${runno}_*.txt`
+      ccfile=`find $ccpath -name 20[0-2][0-9][01][0-9][0-3][0-9]_*${runno}_[PDCS]_*_S.rep`
+      source=`echo $ccfile | cut -d_ -f4`
+      cacofile=`find /magic/subsystemdata/caco/$date -name dc_20[0-2][0-9]_[01][0-9]_[0-3][0-9]_*${runno}_${source}.txt`
       echo "runno: "$runno
       echo "ccfile: "$ccfile
@@ -247,9 +251,5 @@
          do
             newrun=`echo $runno - $i | bc`
-     #      echo "$missingcacorun + $i = $newrun"
-            path=`dirname $ccfile`
-            path=`echo $path | sed -e 's/cc/caco/'`
-            echo "path: "$path
-            cacofile=`find $path -name *$newrun*`
+            cacofile=`find $cacopath -name *$newrun*`
             if [ "$cacofile" = "" ]
             then
