#$ -wd /tmp #$ -j y cd $TMPDIR . /path/to/your/current/build/config.sh data=$VMCWORKDIR"/macro/prod" _target=$data"/data/" prefix=13 nEvts=1000 pdg=13 mom=10. mult=1 if test "$1" != ""; then prefix=$1 fi if test "$2" != ""; then nEvts=$2 fi if test "$3" != ""; then pdg=$3 fi if test "$4" != ""; then mom=$4 fi if test "$5" != ""; then mult=$5 fi outprefix=$TMPDIR"/M"$prefix"_"$SGE_TASK_ID echo $TMPDIR root -l -q -b -w $data"/"prod_sim_pgun.C\(\"$outprefix\",$nEvts,$pdg,$mom,$mult\) &> $outprefix"_sim.log" root -l -b -q -w $data"/"prod_dig.C\(\"$outprefix\"\) &> $outprefix"_dig.log" root -l -b -q -w $data"/"prod_rec.C\(\"$outprefix\"\) &> $outprefix"_rec.log" root -l -b -q -w $data"/"prod_pid.C\(\"$outprefix\"\) &> $outprefix"_pid.log" # Move the data to the persistent storage cp -v $TMPDIR/M*root $_target cp -v $TMPDIR/M*log $_target # Evacuate the log-file cp -v $SGE_STDOUT_PATH $_target/$JOB_ID.log # Clean up rm $TMPDIR/M*root rm $TMPDIR/M*log rm $TMPDIR/Fair*root