Index: trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C	(revision 7426)
@@ -71,5 +71,5 @@
 }
 
-int checkfileavail(TString sequenceno)
+int checkfileavail(TString sequencefile)
 {
     TEnv env("sql.rc");
@@ -89,7 +89,18 @@
     TEnv rc("steps.rc");
 
-    cout << "sequ: " << sequenceno.Data() << endl;
-    TString query(Form("SELECT fRunNumber FROM RunData WHERE fSequenceFirst=%s",
-                       sequenceno.Data()));
+    TEnv sequ(sequencefile);
+
+    TString runs;
+    runs = sequ.GetValue("Runs", "");
+    runs.ReplaceAll(" ", ",");
+    if (runs.IsNull())
+    {
+        cout << "ERROR - No runs in file " << sequencefile << " found." << endl;
+        return 0;
+    }
+
+    cout << "sequ file: " << sequencefile.Data() << endl;
+    TString query(Form("SELECT fRunNumber FROM RunData WHERE fRunNumber in (%s)",
+                       sequencefile.Data()));
 
     TSQLResult *res = serv.Query(query);
Index: trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7426)
@@ -82,9 +82,12 @@
    echo "checking files for sequence $sequence..." >> $scriptlog 2>&1 
    no=`printf %08d $sequence | cut -c 0-4`
+   no2=`printf %08d $sequence`
    outpath=$logpath/checkfileavail/$no
    echo "outpath: "$outpath  >> $scriptlog 2>&1 
    makedir $outpath  >> $scriptlog 2>&1 
+   
+   sequencefile=$sequpath/$no/sequence$no2.txt
 
-   check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequence\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
+   check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
 
    case $check1 in
Index: trunk/MagicSoft/Mars/datacenter/scripts/dowebplots
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/dowebplots	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/scripts/dowebplots	(revision 7426)
@@ -72,47 +72,32 @@
 do 
    date >> $scriptlog 2>&1
-   path=`dirname $rootfile`
-   file=`basename $rootfile`
-   base=`echo $file | sed -e 's/.root$//g'`
-   echo "rootfile: $file" >> $scriptlog 2>&1
-   echo "path    : $path" >> $scriptlog 2>&1
-   echo "base    : $base" >> $scriptlog 2>&1
+   psfile=`echo $file | sed -e 's/.root$/.ps/g'`
+   echo "rootfile: $rootfile" >> $scriptlog 2>&1
+   echo "psfile:   $psfile" >> $scriptlog 2>&1
    
-   X=0
-   while [ "$X" -le "50" ] >> $scriptlog 2>&1
-   do 
-      X=$((X+1))
-      echo "$X. step" >> $scriptlog 2>&1
+   daterootfile=`date +%Y%m%d -r $rootfile` >> $scriptlog 2>&1
+   datepsfile=`date +%Y%m%d -r $psfile` >> $scriptlog 2>&1
+   if [ "$datepsfile" = "" ]
+   then
+      echo "date of psfile is empty -> the file $psfile doesn't exist" >> $scriptlog 2>&1
+      echo " -> setting date to 0 and producing psfile..." >> $scriptlog 2>&1
+      datepsfile=0
+   fi
 
-      tabfile=$path/$base-tab$X
-      daterootfile=`date +%Y%m%d -r $rootfile` >> $scriptlog 2>&1
-      dategiffile=`date +%Y%m%d -r $tabfile.gif` >> $scriptlog 2>&1
-      if [ "$dategiffile" = "" ]
-      then
-         echo "date of gif-file is empty -> the file $tabfile.gif doesn't exist" >> $scriptlog 2>&1
-         echo " -> setting date to 0 and producing gif-file..." >> $scriptlog 2>&1
-         dategiffile=0
-      fi
+   echo "checking date..."  >> $scriptlog 2>&1
+   echo "date of rootfile: $daterootfile" >> $scriptlog 2>&1
+   echo "date of psfile:   $datepsfile"   >> $scriptlog 2>&1
 
-      echo "checking date..."  >> $scriptlog 2>&1
-      echo "date of rootfile: $daterootfile" >> $scriptlog 2>&1
-      echo "date of giffile:  $dategiffile"  >> $scriptlog 2>&1
+   if [ "$datepsfile" -gt "$daterootfile" ] >> $scriptlog 2>&1
+   then
+      echo "psfile is older than rootfile -> continue " >> $scriptlog 2>&1
+      continue
+   fi
 
-      if [ "$dategiffile" -gt "$daterootfile" ] >> $scriptlog 2>&1
-      then
-         echo "gif-file is older than root-file -> continue " >> $scriptlog 2>&1
-         continue
-      fi
+   echo "producing psfile..." >> $scriptlog 2>&1
+   ./showplot -b --save-as-ps=$psfile $rootfile >> $scriptlog 2>&1
 
-      echo "producing ps-file with plots for tab $X..." >> $scriptlog 2>&1
-      ./showplot -b --save-as-ps=$tabfile --tab=$X $rootfile >> $scriptlog 2>&1
-      if ! ls $tabfile.ps >> $scriptlog 2>&1
-      then 
-         echo "tab $X doen't exist -> break" >> $scriptlog 2>&1
-         break
-      fi
-      echo "converting plots to gif for tab $X..." >> $scriptlog 2>&1
-      convert -verbose -rotate 90 $tabfile.ps $tabfile.gif >> $scriptlog 2>&1
-   done
+   echo "converting plots to png..." >> $scriptlog 2>&1
+   pstoimg -antialias -flip r270 -density 100 -type png -multipage $psfile >> $scriptlog 2>&1
 done
 
Index: trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles	(revision 7426)
+++ trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles	(revision 7426)
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# ========================================================================
+#
+# *
+# * This file is part of MARS, the MAGIC Analysis and Reconstruction
+# * Software. It is distributed to you in the hope that it can be a useful
+# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+# * It is distributed WITHOUT ANY WARRANTY.
+# *
+# * Permission to use, copy, modify and distribute this software and its
+# * documentation for any purpose is hereby granted without fee,
+# * provided that the above copyright notice appear in all copies and
+# * that both that copyright notice and this permission notice appear
+# * in supporting documentation. It is provided "as is" without express
+# * or implied warranty.
+# *
+#
+#
+#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
+#
+#   Copyright: MAGIC Software Development, 2000-2004
+#
+#
+# ========================================================================
+
+umask 0002
+
+ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/*
+# output for chmod with -v or -c (only changes)
+
+rawfiles=`find /magic/datacenter/fromtape/rawdata/ -name '*.*'`
+
+for rawfile in $rawfiles
+do 
+#  echo "file: "$rawfile
+#  newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`
+  newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
+#  echo "new file: "$newrawfile
+  newdir=`dirname $newrawfile`
+#  echo "newdir: "$newdir
+  if [ ! -d $newdir ]
+  then
+    echo "make dir "$newdir
+    mkdir -p $newdir
+  fi
+
+  mv -v $rawfile $newrawfile
+
+done
+
Index: trunk/MagicSoft/Mars/datacenter/scripts/movingsubsystemfiles
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/movingsubsystemfiles	(revision 7426)
+++ trunk/MagicSoft/Mars/datacenter/scripts/movingsubsystemfiles	(revision 7426)
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# ========================================================================
+#
+# *
+# * This file is part of MARS, the MAGIC Analysis and Reconstruction
+# * Software. It is distributed to you in the hope that it can be a useful
+# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+# * It is distributed WITHOUT ANY WARRANTY.
+# *
+# * Permission to use, copy, modify and distribute this software and its
+# * documentation for any purpose is hereby granted without fee,
+# * provided that the above copyright notice appear in all copies and
+# * that both that copyright notice and this permission notice appear
+# * in supporting documentation. It is provided "as is" without express
+# * or implied warranty.
+# *
+#
+#
+#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
+#
+#   Copyright: MAGIC Software Development, 2000-2004
+#
+#
+# ========================================================================
+
+umask 0002
+
+ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/{ccdata,cacodata,amc,daqlog}/* 
+
+subsysfiles=`find /magic/datacenter/fromtape/ccdata/ -name '*.*'`
+subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/daqlog/ -name '*.*'`)
+subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/cacodata/ -name '*.*'`)
+subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/amc/ -name '*.*'`)
+
+for subsysfile in ${subsysfiles[@]}
+do 
+#  echo "file: "$subsysfile
+  newsubsysfile=`echo $subsysfile | sed -e 's/datacenter\/fromtape/subsystemdata/g' -e 's/daqlog/daq__/g' -e 's/ccdata/cc/g' -e 's/cacodata/caco/g' -e 's/_/\//1' -e 's/_/\//1' -e 's/\/\///g'`
+#  echo "new file: "$newsubsysfile
+  newdir=`dirname $newsubsysfile`
+#  echo "newdir: "$newdir
+  if [ ! -d $newdir ]
+  then
+    echo "make dir "$newdir
+    mkdir -p $newdir
+  fi
+
+  mv -v $subsysfile $newsubsysfile
+
+done
+
Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7426)
@@ -94,5 +94,5 @@
 todofiles=`ls -r $listpath/ToDo-$table-$column-*`
 
-echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
+#echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
 
 for todofile in ${todofiles[@]}
@@ -192,5 +192,5 @@
              then
                 echo "no ccfile found for run "$runno >> $scriptlog 2>&1
-                break
+                break 2
              fi
              echo "cacofile: "$cacofile >> $scriptlog 2>&1
@@ -211,6 +211,6 @@
                       continue
                    else
+                      echo "cacofile: "$cacofile >> $scriptlog 2>&1
                       break
-                      echo "cacofile: "$cacofile >> $scriptlog 2>&1
                    fi
                 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/runganymed
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runganymed	(revision 7426)
@@ -86,5 +86,5 @@
 todofiles=`ls $listpath/ToDo-$table-$column-*`
 
-echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
+#echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
 
 for todofile in ${todofiles[@]}
Index: trunk/MagicSoft/Mars/datacenter/scripts/runstar
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7407)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7426)
@@ -85,5 +85,5 @@
 todofiles=`ls $listpath/ToDo-$table-$column-*`
 
-echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
+#echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
 
 for todofile in ${todofiles[@]}
