#!/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  05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
#
#   Copyright: MAGIC Software Development, 2000-2006
#
#
# ========================================================================
#
# 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

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

#addresses to which the errors are sent
erradrs="datacenter@astro.uni-wuerzburg.de" 
#addresses to which the changes are sent
adrs="datacenter@astro.uni-wuerzburg.de, tbretz@astro.uni-wuerzburg.de" 


#setup for jobmanager
sleeptime=3 #30
errorsleeptime=10 #180
max=16 #maximum number of processes
#log files (can't be defined in script itself, as script can run longer 
#than one day
errorlog=$logpath/jobmanager/`date +%Y/%m`/error`date +%F`.log
scriptslog=$logpath/jobmanager/`date +%Y/%m`/jobmanager`date +%F`.log

scripts=( "runcallisto" "runstar" "runganymed" "dodatacheck" ) 
scriptscolname=( "fCallisto" "fStar" "fGanymed" "fDataCheckDone" ) 

#hour:            0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
pnototal=(       16 16 16 16 16 16 16 12 12 12 10 10 10 12 12 12 12 12 12 14 16 16 16 16 )
pnototalwe=(     16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 )

pnocallisto=(     8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8 )
pnostar=(         8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8 )
pnoganymed=(      3  3  3  3  3  3  3  2  2  2  1  1  2  2  1  1  1  1  1  2  2  3  3  3 )
pnodatacheck=(   16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 )

pnocallistowe=(  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=(      10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 )
pnoganymedwe=(    3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3 )
pnodatacheckwe=( 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 )

pnosweek=( ${pnocallisto[@]} ${pnostar[@]} ${pnoganymed[@]} ${pnodatacheck[@]} )
pnoswe=( ${pnocallistowe[@]} ${pnostarwe[@]} ${pnoganymedwe[@]} ${pnodatacheckwe[@]} )

