Index: trunk/MagicSoft/Mars/datacenter/scripts/runganymed
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7426)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7460)
@@ -20,9 +20,19 @@
 #   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
 #
-#   Copyright: MAGIC Software Development, 2000-2004
+#   Copyright: MAGIC Software Development, 2000-2006
 #
 #
 # ========================================================================
 #
+# This script is launching ganymed for datasets.
+# 
+# In the case of ganymed only one dataset is processed. Despite of 
+# that the structure of the script is such, that also more datasets could
+# be processed. The restriction to one dataset has been made, as ganymed 
+# takes some time. There's one todo file per dataset. 
+# First the script searches for a todo file. Then ganymed is run for the 
+# dataset from this todo file. 
+#
+# the ganymed.rc files are stored in the setup directory
 #
 
@@ -45,5 +55,4 @@
 scriptlogpath=$logpath/run/ganymed/`date +%Y/%m/%d`
 makedir $scriptlogpath
-
 scriptlog=$scriptlogpath/runganymed-$datetime.log
 
@@ -54,4 +63,5 @@
 cd $mars
 
+# check if getting of list is already running
 date > $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1
 checklock0=$?
@@ -65,4 +75,5 @@
 esac
 
+# finding todo file
 echo "checking if other todo-files are there" >> $scriptlog 2>&1
 if  ls $todofile-[1-9]*.txt >> $scriptlog 2>&1
@@ -82,9 +93,8 @@
 rm -v $lockpath/lock-getting-ganymed-list.txt >> $scriptlog 2>&1
 
+# choosing todo file
 nr=bla
 echo "finding the right todo-file" >> $scriptlog 2>&1
 todofiles=`ls $listpath/ToDo-$table-$column-*`
-
-#echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
 
 for todofile in ${todofiles[@]}
@@ -114,7 +124,6 @@
 esac
 
-
+# retrieve dataset from todo file
 datasets=(`cat $todofile`)
-
 if [ "$datasets" = "" ]
 then 
@@ -126,6 +135,6 @@
 fi
 
+# run ganymed for dataset
 echo "datasets: "${datasets[@]} >> $scriptlog 2>&1
-
 for dataset in ${datasets[@]}
 do 
@@ -138,4 +147,5 @@
   datasetfile="$datasetpath/$no/dataset$no2.txt"
   echo "datasetfile: "$datasetfile >> $scriptlog 2>&1
+  # get observation mode to choose ganymed.rc file
   wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 
   wobble2=`echo $wobble | grep ^\#` >> $scriptlog 2>&1 
