Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:11:58

0001 #! /bin/bash
0002 export USER="$(id -u -n)"
0003 export LOGNAME=${USER}
0004 export HOME=/sphenix/u/${LOGNAME}
0005 
0006 if [ "$#" -ne 8 ]; then
0007     echo "Usage: $0 <run number> <productionTag> <calodstlist> <inttdstlist> <number of events> <output directory> <output file name> <software version>"
0008     exit 1
0009 fi
0010 
0011 # print all arguments
0012 echo "run number: $1"
0013 echo "productionTag: $2"
0014 echo "calodstlist: $3"
0015 echo "inttdstlist: $4"
0016 echo "number of events: $5"
0017 echo "output directory: $6"
0018 echo "output file name: $7"
0019 echo "software version: $8"
0020 
0021 source /opt/sphenix/core/bin/sphenix_setup.sh -n $8
0022 
0023 export MYINSTALL=$HOME/install
0024 export LD_LIBRARY_PATH=$MYINSTALL/lib:$LD_LIBRARY_PATH
0025 export ROOT_INCLUDE_PATH=$MYINSTALL/include:$ROOT_INCLUDE_PATH
0026 
0027 source /opt/sphenix/core/bin/setup_local.sh $MYINSTALL
0028 
0029 # check if the output directory exists. If not, create it.
0030 if [ ! -d "$6" ]; then
0031     mkdir -p $6
0032 fi
0033 
0034 # output file name is $6/$7
0035 OUTPUTFILE="$6/$7"
0036 # filename for the file with BCO difference between adjacent events added; add _wEvtBCODiff after ntuple_ in the output file name
0037 OUTPUTFILE_BCO="${OUTPUTFILE/ntuple_/ntuple_wEvtBcoDiff_}"
0038 
0039 # 1st argument: run number
0040 # 2nd argument: productionTag
0041 # 3rd argument: calodstlist
0042 # 4th argument: inttdstlist
0043 # 5th argument: number of events
0044 # 6th argument: output directory
0045 # 7th argument: output file name
0046 root.exe -q -b Fun4All_dNdeta2024AuAu_production.C\($1,\"$2\",\"$3\",\"$4\",$5,\"$OUTPUTFILE\",0,0\)
0047 
0048 echo all done