Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:21:02

0001 #!/usr/bin/bash
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 #while read dir; do 
0013 #  rm $TargetDir/ihcal_hist_"$dir".root
0014 #  hadd -k $TargetDir/ihcal_hist_"$dir".root condorout/OutDir*/ihcal_h*"$dir"*.root
0015 #  rm $TargetDir/ohcal_hist_"$dir".root
0016 #  hadd -k $TargetDir/ohcal_hist_"$dir".root condorout/OutDir*/ohcal_h*"$dir"*.root
0017 #done < runlist.txt 
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