Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-05 08:09:07

0001 #!/bin/bash
0002 
0003 INPUTLIST=filelist_lq_20x250_3pion.txt
0004 
0005 FILENAME=LeptoAna_r05_p250_e20.csv
0006 
0007 FILENAME_TMP=LeptoAna_r05_p250_e20_temp.txt
0008 
0009 # write trees to .csv file
0010 root -b -q tree2csv.C\(\"$INPUTLIST\",\"$FILENAME_TMP\"\)
0011 
0012 #cat $FILENAME | awk '{print $2 "," $4 "," $6 "," $8 "," $10 "," $12 "," $14}' | grep -v ',,' > $FILENAME_CLEAN
0013 
0014 # clean file- replace '*' with ',', remove line separator, remove whitespaces
0015 cat $FILENAME_TMP | \
0016     tr -d "[:blank:]" | \
0017     tr "*" "," | \
0018     sed 's,.\(.*\).$,\1,g' | \
0019     grep -v ',,' > $FILENAME
0020 
0021 # cleanup temporary file
0022 rm $FILENAME_TMP