Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-04 08:12:08

0001 #!/bin/bash
0002 #
0003 # condor executes runana.cmd 0, runana.cmd 1, etc.
0004 # where $1 = 0, 1, etc...
0005 #
0006 
0007 export USER="$(id -u -n)"
0008 export LOGNAME=${USER}
0009 export HOME=/sphenix/u/${LOGNAME}
0010 
0011 source ${HOME}/.bashrc
0012 
0013 condor=true
0014 condorrun=0
0015 condorjobs=500
0016 fullrun=true
0017 fname="DST_TRIGGERED_EVENT_seb20_run2pp_ana502_nocdbtag_v001-00047972-%05d.root"
0018 ofname1="47972/0/zdcneutronlocpol_47972_%05d.root"
0019 ofname2="47972/0/zdcneutronlocpol_47972_%04d_%05d.root"
0020 
0021 if [ "$condor" = false ]; then    
0022     #=================== Run standalone =========================#
0023     startevent=100000
0024     index=0
0025     filename=$(printf "$fname" $index)
0026 
0027     if [ "$fullrun" = true ]; then      
0028         outname=$(printf "$ofname1" $index)
0029         root -l -q "Fun4All_ZDCNeutronLocPol.C(\"$filename\",\"$outname\")"
0030     else
0031         outname=$(printf "$ofname2" $index $startevent)
0032         root -l -q "Fun4All_ZDCNeutronLocPol.C(\"$filename\",\"$outname\", $startevent)"
0033     fi
0034     #=========================================================#
0035 
0036 else
0037     #=================== Run with condor =========================#
0038     startevent=$(( ${1}*100000))
0039     filename=$(printf "$fname" $(( ${1} + condorrun * condorjobs )))
0040 
0041     if [ "$fullrun" = true ]; then
0042         outname=$(printf "$ofname1" $(( ${1} + condorrun * condorjobs )))
0043         root -l -q "Fun4All_ZDCNeutronLocPol.C(\"$filename\",\"$outname\")"
0044     else
0045         outname=$(printf "$ofname2" ${1} ${1})
0046         root -l -q "Fun4All_ZDCNeutronLocPol.C(\"$filename\",\"$outname\", $startevent)"
0047     fi
0048     #=========================================================#
0049 fi