Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:21:01

0001 #!/usr/bin/env bash
0002 export USER="$(id -u -n)"
0003 export LOGNAME=${USER}
0004 export HOME=/sphenix/u/${LOGNAME}
0005 
0006 source /opt/sphenix/core/bin/sphenix_setup.sh -n new
0007 
0008 f4a_bin=${1}
0009 nEvents=${2}
0010 input=${3}
0011 iter=${4}
0012 calib=${5}
0013 calib_field=${6}
0014 submitDir=${7}
0015 
0016 if [[ ! -z "$_CONDOR_SCRATCH_DIR" && -d $_CONDOR_SCRATCH_DIR ]]
0017  then
0018    cd $_CONDOR_SCRATCH_DIR
0019    cp -v $calib .
0020    getinputfiles.pl $input
0021    echo $input > test.list
0022  else
0023    echo "condor scratch NOT set"
0024    exit -1
0025 fi
0026 
0027 calib=$(basename $calib)
0028 
0029 # print the environment - needed for debugging
0030 printenv
0031 
0032 # root -b -l -q "$f4a_macro($nEvents, \"test.list\", $iter, \"$calib\", \"$calib_field\")"
0033 $f4a_bin "$nEvents" "test.list" "$iter" "$calib" "$calib_field"
0034 
0035 echo "All Done and Transferring Files Back"
0036 cp -v OUT*.root $submitDir
0037 
0038 echo "Finished"