Index: trunk/Mars/datacenter/scripts/setup.phido.fact.mc
===================================================================
--- trunk/Mars/datacenter/scripts/setup.phido.fact.mc	(revision 10006)
+++ trunk/Mars/datacenter/scripts/setup.phido.fact.mc	(revision 10007)
@@ -36,4 +36,9 @@
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
 fi
+
+# site
+processingsite=phido
+sitekey=2
+storagesite=wue
 
 # queuing system
Index: trunk/Mars/datacenter/scripts/setup.wue.fact.mc
===================================================================
--- trunk/Mars/datacenter/scripts/setup.wue.fact.mc	(revision 10006)
+++ trunk/Mars/datacenter/scripts/setup.wue.fact.mc	(revision 10007)
@@ -36,4 +36,9 @@
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
 fi
+
+# site
+processingsite=wue
+sitekey=1
+storagesite=wue
 
 # queuing system
@@ -83,6 +88,6 @@
 sleeptimelimit=360 #360
 errorsleeptimedefault=60 #60
-max=30 #maximum number of processes for one script in case there are more than one and the others do not have anything to do
-totalmax=40 #maximum number of processes (total) overwrites pnototal(we) in case it is smaller
+max=20 #maximum number of processes for one script in case there are more than one and the others do not have anything to do
+totalmax=32 #maximum number of processes (total) overwrites pnototal(we) in case it is smaller
 
 #
@@ -98,18 +103,23 @@
 pnototalwe=(     32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 )
 
-pnocorsika=(     30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 )
-pnoceres=(       20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )
+pnocorsika=(     10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 )
+pnoceres=(       25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 )
 pnocallisto=(    32 32 32 32 32 30 30 18 18 20 20 20 20 20 20 20 20 20 20 18 18 30 30 32 )
-pnostar=(        10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 )
+pnostar=(        20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )
 
-pnocorsikawe=(   30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 )
-pnocereswe=(     20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )
+pnocorsikawe=(   10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 )
+pnocereswe=(     25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 )
 pnocallistowe=(  32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 )
-pnostarwe=(      10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 )
+pnostarwe=(      20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )
 
 # set variables for jobmanager 
-scripts=( "runcorsika" "runceres" "runcallisto_mc" "runstar_mc" ) 
-scriptscolname=( "Corsika" "Ceres" "Callisto" "Star" ) 
-pnosweek=( ${pnocorsika[@]} ${pnoceres[@]} ${pnocallisto[@]} ${pnostar[@]} ) 
-pnoswe=( ${pnocorsikawe[@]} ${pnocereswe[@]} ${pnocallistowe[@]} ${pnostarwe[@]} ) 
+#scripts=( "runcorsika" "runceres" "runcallisto_mc" "runstar_mc" ) 
+#scriptscolname=( "Corsika" "Ceres" "Callisto" "Star" ) 
+#pnosweek=( ${pnocorsika[@]} ${pnoceres[@]} ${pnocallisto[@]} ${pnostar[@]} ) 
+#pnoswe=( ${pnocorsikawe[@]} ${pnocereswe[@]} ${pnocallistowe[@]} ${pnostarwe[@]} ) 
 
+scripts=( "runceres" "runcallisto_mc" "runstar_mc" ) 
+scriptscolname=( "Ceres" "Callisto" "Star" ) 
+pnosweek=( ${pnoceres[@]} ${pnocallisto[@]} ${pnostar[@]} ) 
+pnoswe=( ${pnocereswe[@]} ${pnocallistowe[@]} ${pnostarwe[@]} ) 
+
Index: trunk/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/Mars/datacenter/scripts/sourcefile	(revision 10006)
+++ trunk/Mars/datacenter/scripts/sourcefile	(revision 10007)
@@ -169,4 +169,5 @@
    echo " starttime=$starttime"
    echo " stoptime=$stoptime"
+   echo " availtime=$availtime"
    echo " returncode=$returncode"
    echo "-- check: -$check-"
@@ -243,4 +244,5 @@
    query=$query" ISNULL("$step"Status.fStartTime) "
    query=$query" AND ISNULL("$step"Status.fStopTime) "
+   query=$query" AND ISNULL("$step"Status.fAvailable) "
    query=$query" AND ISNULL("$step"Status.fReturnCode) "
    # add requirement for production host in case it is needed
@@ -265,4 +267,5 @@
       query=$query" NOT ISNULL("${needs[$k]}"Status.fStartTime) "
       query=$query" AND NOT ISNULL("${needs[$k]}"Status.fStopTime) "
+      query=$query" AND NOT ISNULL("${needs[$k]}"Status.fAvailable) "
       query=$query" AND ISNULL("${needs[$k]}"Status.fReturnCode) "
       query=$query" , 1, NULL)) "
@@ -344,4 +347,5 @@
    starttime=NULL
    stoptime=NULL
+   availtime=NULL
    returncode=NULL
    # evaluate the status values
@@ -354,4 +358,8 @@
                        starttime=noreset
                        stoptime="Now()"
+                       if [ "$processingsite" = "$storagesite" ]
+                       then
+                          availtime="Now()"
+                       fi
                        ;;
                   no)  printprocesslog "DEBUG setstatus stop - nothing new"
@@ -361,4 +369,8 @@
                        starttime=noreset
                        stoptime="Now()"
+                       if [ "$processingsite" = "$storagesite" ]
+                       then
+                          availtime="Now()"
+                       fi
                        if [ "$check" == "" ]
                        then
@@ -391,5 +403,6 @@
       query=$query" "$step"Status.fStartTime=$starttime, "
    fi
-   query=$query" "$step"Status.fStopTime=$stoptime, "$step"Status.fReturnCode=$returncode "
+   query=$query" "$step"Status.fStopTime=$stoptime, "$step"Status.fAvailable=$availtime"
+   query=$query", "$step"Status.fReturnCode=$returncode , "$step"Status.fProcessingSiteKEY=$sitekey "
    # set also the status values of the influenced steps
    for otherstep in $othersteps
@@ -397,5 +410,7 @@
       query=$query", "$otherstep"Status.fStartTime=NULL "
       query=$query", "$otherstep"Status.fStopTime=NULL "
+      query=$query", "$otherstep"Status.fAvailable=NULL "
       query=$query", "$otherstep"Status.fReturnCode=NULL "
+      query=$query", "$otherstep"Status.fProcessingSiteKEY=NULL "
    done
    # give the condition for which step the status values have to be set
