2 #################################################################
3 # This script sets up and runs the prompt offline reco
5 # Data gets put in a dir named after the run number in the
6 # $DATADIRBASE dir (default in ~/data)
7 # Never overwrite existing data, make a new directory if necessary
8 # and give it a unique (sequential) number
10 # it is possible to override the default rec.C by putting a symlink
13 # origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
14 #################################################################
19 echo " Usage: `basename $0` RunNumber GDCnumber [Trigger]"
20 echo " (don't use the Trigger argument unless you're really sure what you're doing!)"
25 DATADIRBASE="/local/home/daq/data/current"
26 RECMACRO="$ALICE_ROOT/test/cosmic/rec.C"
27 PROMPTOFFLINEMACRO="/local/home/daq/alisoft/macros/RunPromptOffline.C"
29 #override the default rec.C if ~/rec.C exists and is symlink
33 echo "~/rec.C will override the default rec.C"
34 read -n 1 -p "Do you want to use the new one? [Y/n]" ans
35 if [[ $ans == "Y" || $ans == "y" || $ans == "" ]]
37 RECMACRO="$HOME/rec.C"
39 echo "OK, using $RECMACRO"
43 echo "OK, using $RECMACRO"
48 # data gets put in a dir named after the run number
49 DATADIR="${DATADIRBASE}/${1}_OnlineDisplay"
51 # never overwrite existing data, make a new directory if necessary
52 # and give it a unique (sequential) number
59 DIRNUMBER=`echo ${x} | sed -e s%${DATADIR}_*%%`
60 if [[ ${DIRNUMBER} == "" ]]
64 if [[ ${DIRNUMBER} -ge ${BIGGESTNUMBER} ]]
66 BIGGESTNUMBER=$((DIRNUMBER+1))
69 DATADIR=${DATADIR}_${BIGGESTNUMBER}
74 cp ${RECMACRO} ${DATADIR}
79 alieve ${PROMPTOFFLINEMACRO}\(${1},${2},${3}\) | tee alieve.log
81 alieve ${PROMPTOFFLINEMACRO}\(${1},${2}\) | tee alieve.log