Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:18

0001 #!/usr/bin/env bash
0002 
0003 dir=${1}
0004 
0005 while read run; do
0006     a=`ls $dir/$run/output | wc -l`
0007     b=`wc -l $dir/$run/dst*.list | cut -d " " -f1`
0008 
0009     if [[ $a != $b ]]; then
0010         echo "Run: $run, Processed: $a, Total: $b"
0011         ls $dir/$run/output | cut -d "-" -f2 | cut -d "." -f1 > $dir/$run/a.txt
0012 
0013         # initial clean up
0014         rm -f $dir/$run/done.txt
0015 
0016         # get a list of DSTs that have an output
0017         while read line; do
0018             line=$((line+1))
0019             sed -n "${line}p" $dir/$run/dst*.list >> $dir/$run/done.txt
0020         done < $dir/$run/a.txt
0021 
0022         # find the DSTs without an output
0023         comm -13 $dir/$run/done.txt $dir/$run/dst_calofitting_run2pp-000$run.list > $dir/$run/missing.txt
0024 
0025         # print list of DSTs without an output
0026         cat $dir/$run/missing.txt
0027 
0028         # clean up
0029         rm $dir/$run/a.txt
0030         rm $dir/$run/done.txt
0031     fi
0032 done <$dir/runs.list;