#$ -wd /tmp #$ -j y #$ -v FAIRLIBDIR cd $TMPDIR . $FAIRLIBDIR/../config.sh macrodir=$VMCWORKDIR"/macro/ccbargsi" datadir="/hera/panda/scrutdata/ccbargsi/" prefix="test" dec="DPM" mom=7.53 nEvts=10000 res="pbarpSystem0" pdg=11 detopt="12345" dmode=0 rmode=0 datamode=900 pid="All" if test "$1" != ""; then prefix=$1 fi if test "$2" != ""; then dec=$2 fi if test "$3" != ""; then mom=$3 fi if test "$4" != ""; then nEvts=$4 fi if test "$5" != ""; then detopt=$5 fi if test "$6" != ""; then dmode=$6 fi if test "$7" != ""; then rmode=$7 fi if test "$8" != ""; then pid="$8" fi if test "$dec" != "DPM" -a "$dec" != "BOX"; then decfile=$macrodir"/"$dec datamode=$dmode$rmode fi outprefix=$TMPDIR"/"$prefix"_"$datamode datastore=$datadir"/"$mom"_"$detopt if [ ! -d "$datastore" ]; then mkdir $datastore fi root -l -q -b $macrodir"/"simfast_opt.C\(\"$outprefix\",\"$decfile\",$mom,$nEvts,\"$res\"\,$pdg,\"$detopt\"\) &> $outprefix"_fsim.log" # save files rsync -vu $TMPDIR/*fast* $datastore root -l -q -b $macrodir"/"ana_etac_task_batch.C\(\"$outprefix\",$nEvts,$mom,$dmode,$rmode,$datamode,\"$pid\"\) &> $outprefix"_"$dmode"_"$rmode"_"$datamode"_ana.log" # Move the data to the persistent storage rsync -vu $TMPDIR/* $datastore # Evacuate the log-file rsync -vu $SGE_STDOUT_PATH $datastore/$prefix"_"$datamode"_"$JOB_ID.log # Clean up rm $TMPDIR/*