Index: trunk/MagicSoft/Mars/datacenter/scripts/dowebplots
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/dowebplots	(revision 7322)
+++ 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
 
