#!/bin/tcsh if ( ! $?JOB_ID ) setenv JOB_ID 1234 setenv JOB_ID `basename $JOB_ID .farmpbs.jlab.org` set workroot=/work/halld/home/davidl/2009.02.photon_resolutions source ${workroot}/setenv.csh set workdisk=${workroot}/set3 set bindir=${workroot}/bin/Linux_Fedora8-i686-gcc4.1.2 set libdir=${workroot}/lib/Linux_Fedora8-i686-gcc4.1.2 mkdir -p $workdisk env > $workdisk/env.${JOB_ID} mkdir tmp${JOB_ID} cd tmp${JOB_ID} ############################################### # Run hdgeant rm -f control.in cat ${workroot}/farm/control.in.tmpl | sed -e s/XXX/${JOB_ID}/g > ${workdisk}/control.in.${JOB_ID} ln -s ${workdisk}/control.in.${JOB_ID} control.in echo "hdgeant output redirected to log file: ${workdisk}/hdgeant_${JOB_ID}.log" ${bindir}/hdgeant >& ${workdisk}/hdgeant_${JOB_ID}.log # Run hd_root echo "hd_root output redirected to log file: ${workdisk}/hd_root_${JOB_ID}.log" ${bindir}/hd_root --plugin=photoneff_hists hdgeant*.hddm -o hd_root_${JOB_ID}.root >& ${workdisk}/hd_root_${JOB_ID}.log cp hdgeant*.hddm hd_root*.root $workdisk rm -f hdgeant*.hddm hd_root*.root