Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #! /bin/bash
0002 
0003 # if no argument is given, print usage
0004 if [ "$#" -ne 1 ]; then
0005     echo "Usage: $0 <run number>"
0006     exit 1
0007 fi
0008 
0009 runnumber=$1
0010 
0011 # create the directory for lists 
0012 mkdir -p ./calolists
0013 mkdir -p ./inttlists
0014 
0015 
0016 # create the list of files for calo
0017 # ls -1 /sphenix/lustre01/sphnxpro/physics/run2auau/calophysics/new_2024p007/run_00054200_00054300/DST_TRIGGERED_EVENT_run2auau_new_2024p007-000${runnumber}-*.root > ./calolists/calo_${runnumber}.list
0018 ls /sphenix/lustre01/sphnxpro/physics/run2auau/calophysics/ana441_2024p007/run_00054200_00054300/DST_TRIGGERED_EVENT_run2auau_ana441_2024p007-000${runnumber}-*.root > ./calolists/calo_${runnumber}.list
0019 # count the number of files in the list
0020 NFILESCALO=$(cat ./calolists/calo_${runnumber}.list | wc -l)
0021 echo "NFILESCALO = $NFILESCALO"
0022 # loop over the files in the list and create one list per file
0023 for ifile in $(seq 1 $NFILESCALO)
0024 do
0025     # print line by line the list of files
0026     echo $(sed -n ${ifile}p ./calolists/calo_${runnumber}.list) > ./calolists/calo_${runnumber}_$((ifile-1)).list
0027 done
0028 
0029 # create the list of files for intt
0030 # ls -1 /sphenix/lustre01/sphnxpro/physics/slurp/streaming/physics/new_2024p007/run_00054200_00054300/DST_INTT_EVENT_run2auau_new_2024p007-000${runnumber}-*.root > ./inttlists/intt_${runnumber}.list
0031 ls /sphenix/lustre01/sphnxpro/production/run2auau/physics/ana464_2024p011_v001/DST_TRKR_CLUSTER/run_00054200_00054300/dst/DST_TRKR_CLUSTER_run2auau_ana464_2024p011_v001-00054280-*.root > ./inttlists/intt_${runnumber}.list
0032 NFILESINTT=$(cat ./inttlists/intt_${runnumber}.list | wc -l)
0033 echo "NFILESINTT = $NFILESINTT"
0034 for ifile in $(seq 1 $NFILESINTT)
0035 do
0036     echo $(sed -n ${ifile}p ./inttlists/intt_${runnumber}.list) > ./inttlists/intt_${runnumber}_$((ifile-1)).list
0037 done