Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:40

0001 #!/usr/bin/bash
0002 
0003 export USER="$(id -u -n)"
0004 export LOGNAME=${USER}
0005 # check if we run an sphenix account or legacy phenix
0006 if [[ -d /sphenix/u/${USER} ]]
0007 then
0008   export HOME=/sphenix/u/${USER}
0009 else
0010   export HOME=/phenix/u/${USER}
0011 fi
0012 
0013 hostname
0014 
0015 this_script=$BASH_SOURCE
0016 this_script=`readlink -f $this_script`
0017 this_dir=`dirname $this_script`
0018 echo rsyncing from $this_dir
0019 echo running: $this_script $*
0020 
0021 anabuild=new
0022 
0023 source /cvmfs/sphenix.sdcc.bnl.gov/gcc-12.1.0/opt/sphenix/core/bin/sphenix_setup.sh -n $anabuild
0024 
0025 #source /opt/sphenix/core/bin/setup_local.sh $HOME/workarea/sPHENIX/gitrepov5/installv1
0026 
0027 if [[ ! -z "$_CONDOR_SCRATCH_DIR" && -d $_CONDOR_SCRATCH_DIR ]]
0028 then
0029     cd $_CONDOR_SCRATCH_DIR
0030     rsync -av $this_dir/* .
0031 else
0032     echo condor scratch NOT set
0033     exit -1
0034 fi
0035 
0036 # arguments 
0037 # $1: input file
0038 # $2: output csv file
0039 # $3: output ntuple
0040 
0041 echo 'here comes your environment'
0042 printenv
0043 echo arg1 \(input file\) : $1
0044 echo arg2 \(output file\): $2
0045 echo arg3 \(output dir\): $3
0046 
0047 echo running root.exe -q -b Fun4All_TpcQA.C\(0,\"$1\"\)
0048 
0049 root.exe -q -b  Fun4All_TpcQA.C\(0,\"$1\"\)
0050 
0051 ls -l
0052 
0053 cp bcodiff.root $3/$2
0054 
0055 echo "script done"