Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7902)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7907)
@@ -27,25 +27,14 @@
 # This a resource file for the scripts, in which the standard paths and 
 # functions, which are needed more often are stored. 
-#
-
-export ROOTSYS=/opt/root_v4.04.02g
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
-export PATH=$PATH:$ROOTSYS/bin
+# Only constant variables are stored here, changing variables are stored 
+# in datacenter/scripts/setup
+#
+
+source `dirname $0`/setup
 
 mars=`dirname $0 | sed -e 's/\/datacenter\/scripts//'`
-
 macrospath=$mars/datacenter/macros
 scriptspath=$mars/datacenter/scripts
 
-logpath=/magic/datacenter/autologs
-lockpath=/magic/datacenter/locks
-listpath=/magic/datacenter/lists
-setuppath=/magic/datacenter/setup
-
-datapath=/magic/data
-subsystempath=/magic/subsystemdata
-sequpath=/magic/sequences
-datasetpath=/magic/datasets
-
 webpath=/www/htdocs/datacenter
 
@@ -53,5 +42,4 @@
 
 check="ok"
-
 
 #failed codes
@@ -82,6 +70,39 @@
 Ffillganymed=21
 
-
-
+# setup for jobmanager
+steps=$mars/steps.rc
+
+pno=0
+pnototal=0
+running=0
+queued=0
+runningscript=0
+queuedscript=0
+
+
+function setzero()
+{
+   val=$@
+   if [ "$val" == "" ]
+   then 
+      test=`condor_q -global`
+      if [ "$test" == "" ]
+      then 
+         echo $max
+      else
+         echo 0
+      fi
+   else
+      echo $val
+   fi
+}
+
+
+
+
+# in the following the function, which are needed by several scripts, are 
+# defined
+
+# function to exit a script properly
 function finish()
 {
@@ -92,4 +113,5 @@
 }
 
+# function to make sure that a directory is made
 function makedir()
 {
@@ -105,4 +127,5 @@
 }
 
+# function to check if a process is already locked
 function checklock()
 { 
@@ -119,4 +142,5 @@
 }
 
+# function calling the macro, which is producing the todo-list
 function getdolist()
 {
@@ -164,4 +188,5 @@
 }
 
+# function calling the macro to set the status, after a process has finished
 function setstatus()
 {
