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 if [[ ! -z "$_CONDOR_SCRATCH_DIR" && -d $_CONDOR_SCRATCH_DIR ]]
0026 then
0027     cd $_CONDOR_SCRATCH_DIR
0028     rsync -av $this_dir/* .
0029 else
0030     echo condor scratch NOT set
0031     exit -1
0032 fi
0033 
0034 # arguments 
0035 # $1: input file
0036 # $2: output csv file
0037 # $3: output ntuple
0038 
0039 echo 'here comes your environment'
0040 printenv
0041 echo arg1 \(input file\) : $1
0042 echo arg2 \(output file\): $2
0043 echo arg3 \(output dir\): $3
0044 
0045 echo running root.exe -q -b Fun4All_InttQA.C\(10,\"$1\"\)
0046 
0047 root.exe -q -b  Fun4All_InttQA.C\(0,\"$1\",\"$3/$2\"\)
0048 
0049 
0050 echo "script done"