Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:25

0001 #!/bin/bash
0002 
0003 UN=$4
0004 source /opt/sphenix/core/bin/sphenix_setup.sh new
0005 
0006 source /opt/sphenix/core/bin/setup_local.sh /sphenix/user/jocl/projects/testinstall/
0007 
0008 export HOME=/sphenix/u/$UN
0009 
0010 if [[ ! -z "$_CONDOR_SCRATCH_DIR" && -d $_CONDOR_SCRATCH_DIR ]]; then
0011     cd $_CONDOR_SCRATCH_DIR
0012 else
0013     echo condor scratch NOT set
0014     exit -1
0015 fi
0016 SUBDIR=${1}
0017 STARTN=$(( $1 * 20 ))
0018 for i in {1..20}; do
0019     UPLN=$(( $STARTN + $i ))
0020     mkdir -p trigout
0021     mkdir -p $SUBDIR
0022     mkdir -p lists
0023     mkdir -p /sphenix/user/jocl/projects/trigcount_files/${2}/
0024     mkdir -p ./dsts/$2/${2}_${UPLN}
0025     #cp -r $5/run_earlydata.C .
0026     cp -r $5/run_earlydata_2.C .
0027     cp -r $5/lists7/dst_calofitting_run2pp-000${2}.list ./lists/${2}.list
0028     cat ./lists/$2.list
0029     DSTFILE=`sed -n "${UPLN}"p "./lists/${2}.list"`
0030     echo $DSTFILE
0031     if [ -z "${DSTFILE}" ]; then
0032         exit 0
0033     fi
0034     FULLPATH=`psql FileCatalog -t -c "select full_file_path from files where lfn = '${DSTFILE}';"`
0035     echo $FULLPATH
0036     cp $FULLPATH ./$DSTFILE
0037     ls -larth
0038     mv $DSTFILE ./dsts/$2/${2}_${UPLN}.root
0039     root -b -q -l 'run_earlydata_2.C('${UPLN}',0,'${2}','${3}')'
0040     #root -b -q -l 'temp_run.C(1000,"'$DSTFILE'","trigout/tempout_'${2}'_'${UPLN}'_hist.root","trigout/tempout_'${2}'_'${UPLN}'_tree.root","ProdA_2024")'
0041     cp trigout/* /sphenix/user/jocl/projects/trigcount_files/${2}/
0042     rm trigout/*
0043 done