2024-01-27 00:57:57 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
if [ "$#" -ne 3 ]; then
|
|
|
|
echo "Usage: $0 runID timeWindow_ns option"
|
2024-11-05 08:48:21 -05:00
|
|
|
echo "option: 0 - process raw data, 1 - process mapped data"
|
2024-01-27 00:57:57 -05:00
|
|
|
echo "Exiting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
runID=$1
|
|
|
|
timeWindow=$2
|
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
option=$3
|
2024-01-27 00:57:57 -05:00
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
rawFolder=/home/tandem/data1/2024_09_17Fap/data
|
|
|
|
rootFolder=/home/tandem/data1/2024_09_17Fap/data/root_data
|
2024-01-27 00:57:57 -05:00
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
if [ $option -eq 0 ]; then
|
2024-04-15 13:29:57 -04:00
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
rsync -auh --info=progress2 splitpole@128.186.111.223:/media/nvmeData/2024_09_17Fap/*.fsu /home/tandem/data1/2024_09_17Fap/data
|
2024-01-27 00:57:57 -05:00
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
fileList=`\ls -1 ${rawFolder}/*Run_${runID}_*.fsu`
|
2024-01-27 00:57:57 -05:00
|
|
|
|
2024-11-05 08:48:21 -05:00
|
|
|
./EventBuilder ${timeWindow} 0 0 100000000 ${fileList}
|
2024-01-27 00:57:57 -05:00
|
|
|
|
2024-10-25 15:02:59 -04:00
|
|
|
outFile=${rawFolder}/*${runID}*${timeWindow}.root
|
|
|
|
|
|
|
|
mv -vf ${outFile} ${rootFolder}/.
|
|
|
|
|
|
|
|
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
|
|
|
fi
|
2024-04-15 13:29:57 -04:00
|
|
|
|
|
|
|
root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"
|