File indexing completed on 2025-08-06 08:21:02
0001
0002
0003 export TargetDir="$PWD"/combine_out
0004
0005 if [ ! -d ${TargetDir} ]; then
0006 mkdir ${TargetDir}
0007 fi
0008
0009 rm $TargetDir/ohcal_sum.root
0010 rm $TargetDir/ihcal_sum.root
0011
0012
0013
0014
0015
0016
0017
0018
0019 i=0
0020 while read dir; do
0021 if [ "$i" -le 0 ]; then
0022 cp $TargetDir/ihcal_hist_"$dir".root $TargetDir/ihcal_sum.root
0023 cp $TargetDir/ohcal_hist_"$dir".root $TargetDir/ohcal_sum.root
0024 else
0025 hadd -a -k $TargetDir/ihcal_sum.root $TargetDir/ihcal_hist_"$dir".root
0026 hadd -a -k $TargetDir/ohcal_sum.root $TargetDir/ohcal_hist_"$dir".root
0027 fi
0028 i=$((i+1))
0029 done < runlist.txt
0030
0031