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