#$ -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 mom=$2 fi if test "$3" != ""; then nEvts=$3 fi if test "$4" != ""; then detopt=$4 fi if test "$5" != ""; then pid="$5" fi datastore=$datadir"/"$mom"_"$detopt if [ ! -d "$datastore" ]; then echo "No datastore found at "$datastore exit fi # We resubmit our analysis... rsync -vu $datastore"/"$prefix"_"$datamode"_"$SGE_TASK_ID"_fast.root" $TMPDIR"/"$prefix"re_"$datamode"_"$SGE_TASK_ID"_fast.root" ls -hl outprefix=$TMPDIR"/"$prefix"re_"$datamode"_"$SGE_TASK_ID for dmode in 0 1 2 3 do for rmode in 0 1 #2 3 4 5 6 do logfile=$outprefix"_"$dmode"_"$rmode"_"$datamode"_ana.log" root -l -q -b $macrodir"/"ana_etac_task_batch.C\(\"$outprefix\",$nEvts,$mom,$dmode,$rmode,$datamode,\"$pid\"\) &> $logfile rsync -vu $TMPDIR/*taskana.root $datastore rsync -vu $logfile $datastore done done #remove temporary data rm $TMPDIR"/"$prefix"re_"$datamode"_"$SGE_TASK_ID"_fast.root" ls -hl # Move the data to the persistent storage rsync -vu $TMPDIR/* $datastore # Evacuate the log-file rsync -vu $SGE_STDOUT_PATH $datastore/$prefix"re_"$datamode"_"$JOB_ID.$SGE_TASK_ID.log # Clean up rm $TMPDIR/*