Index: trunk/Mars/fact/analysis/gain/fit.sh
===================================================================
--- trunk/Mars/fact/analysis/gain/fit.sh	(revision 17071)
+++ trunk/Mars/fact/analysis/gain/fit.sh	(revision 17073)
@@ -18,11 +18,12 @@
     fi
 
-    cmd="${ROOTSYS}/root -b -q -l ${macro}+\(\\\"${infile}\\\",\\\"${outfile}\\\"\)"
+    cmd="ROOT_HIST=0 ${ROOTSYS}/bin/root -b -q -l ${macro}+\(\\\"${infile}\\\",\\\"${outfile}\\\"\)"
 
     cd ~/Mars
 
-    echo  ${cmd} | qsub -b yes -q test -cwd -e ${outfile}".err" -o ${outfile}".log"
+    echo Submitting ${file}
+    echo "echo ${cmd}; ${cmd}" | qsub -N f${file} -q test -cwd -e ${outfile}".err" -o ${outfile}".log"
 
-    cd -
+    cd - > /dev/null
 done
 
