#!/bin/bash logpath=/usr/bin [ ! -f $logpath/klog ] && logpath=/usr/afsws/bin echo $afspw | $logpath/klog -pipe -principal $userid -cell usatlas.bnl.gov export afspw="" . /afs/usatlas.bnl.gov/scripts/setup_cmt_usatlas.sh $Release gcc cmt co TestRelease TestRelease=`ls -ort TestRelease/ | tail -1 | awk '{print $8}' | cut -d- -f2-` cd TestRelease/TestRelease-$TestRelease/cmt # Change requirements file for Atlfast operation awk '{ gsub( "# use Control", "use Control" ); gsub( "# use Event", "use Event" ); gsub( "# use Generators", "use Generators" ); gsub( "# use Simulation", "use Simulation" ); gsub( "^use AtlasRelease", "# use AtlasRelease" ); print }' requirements > requirements.tmp; mv -f requirements.tmp requirements cmt broadcast cmt config source setup.sh cmt broadcast gmake cd ../run cp -pf $ATLFASTCODEROOT/share/* . # Uncomment the following line if you want to run Isajet instead of Pythia #awk '{ gsub( "^ApplicationMgr.DLLs \\+= { \"PythiaGenerator\"};", "//ApplicationMgr.DLLs \+= { \"PythiaGenerator\"};" ); gsub( "//ApplicationMgr.DLLs \\+= { \"IsajetGenerator\"};", "ApplicationMgr.DLLs \+= { \"IsajetGenerator\"};" ) ; gsub( "//Generator.Members = {\"IsajetModule\"};", "Generator.Members = {\"IsajetModule\"}; IsajetModule.IsajetCommand = {\"isadat isadecay.dat\", \"isapar isapar.dat\", \"isalis isajet.lis\"};" ) ; gsub( "^Generator.Members = {\"PythiaModule\"};", "//Generator.Members = {\"PythiaModule\"};" ); print }' jobOptions.txt > jobOptions.txt.tmp; mv -f jobOptions.txt.tmp jobOptions.txt; [ -f isajet.lis ] && rm isajet.lis # Uncomment the following line if you want to change the default number # of produced event from 10 to something else - here 1000 #awk '{ gsub( "ApplicationMgr.EvtMax = 10;", "ApplicationMgr.EvtMax = 1000;" ); print }' jobOptions.txt > jobOptions.txt.tmp; mv -f jobOptions.txt.tmp jobOptions.txt # Run athena.exe job `alias athena | cut -d= -f2- | cut -d\' -f2` cd ../../.. $logpath/unlog -cell usatlas.bnl.gov