ROOTPWA
checkWavesForFit.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 # checks if all waves in a waveset are in the integrals
4 # usage: checkWavesInIntegrals <Wavesetfile> <DataDir>
5 
6 SET=$1
7 ROOTDIR=$2
8 
9 ERRCOUNT=0
10 
11 while read amp; do
12  echo "Checking wave $amp ...";
13  for bin in $ROOTDIR/*; do
14  if [ ! -s $bin/AMPS/$amp ]; then
15  echo "$amp not found in $bin/AMPS";
16  let ERRCOUNT=$ERRCOUNT+1
17  echo $ERRCOUNT
18  fi;
19  if ! grep -q $amp $bin/AMPS/norm.int; then
20  echo "$amp not found in $bin/AMPS/norm.int";
21  let ERRCOUNT=$ERRCOUNT+1
22  echo $ERRCOUNT
23  fi;
24  if ! grep -q $amp $bin/AMPS/accnorm.int; then
25  echo "$amp not found in $bin/AMPS/accnorm.int";
26  let ERRCOUNT=$ERRCOUNT+1
27  echo $ERRCOUNT
28  fi;
29  done
30 done < $SET
31 
32 echo "Number of Errors=$ERRCOUNT"
33 
34 exit $ERRCOUNT