ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/DTDPGAnalysis/scripts/mergeTrees.sh
Revision: 1.1
Committed: Mon Apr 16 09:28:11 2012 UTC (13 years ago) by guiducci
Content type: application/x-sh
Branch: MAIN
Log Message:
added scripts for producing ntuples from singlemu

File Contents

# User Rev Content
1 guiducci 1.1 NFILE=`rfdir $2 | grep root | wc -l`
2     rfdir $2 | grep root | awk '{print $9}' | sed "s|^| stager_get -M $2/|" | tr "\n" ";" > tmp.sh
3     source tmp.sh
4     rfdir $2 | grep root | awk '{print $9}' | sed "s|^| stager_qry -M $2/|" | tr "\n" ";" > tmp.sh
5     source tmp.sh
6     NSTAGED=`source tmp.sh | grep STAGED | wc -l `
7     echo "Found $NFILE files, of which $NSTAGED staged."
8     echo "stager_get was called, please try again later if you like"
9     echo "now hadding staged files..."
10     `source tmp.sh | grep STAGED | grep root | awk '{print $1}' | sed "s|^|rfio://|" | tr "\n" " " | sed "s|^|hadd $1 |"`
11    
12     rm tmp.sh