#!/bin/bash

#
#echo "${myRoot}.${myExt}"
#diff -w ${myRoot}.${myExt} ${myDir}/${myRoot}.${myExt}
#
#echo "${myRoot}/beta-_${myRoot}_trans$i.bs"
#diff -w ${myRoot}/beta-_${myRoot}_trans$i.bs ${myDir}/${myRoot}/beta-_${myRoot}_trans$i.bs
#

# $1 myDir ; $2 myRoot ; $3 myExt ; $4 mySuf ; $5 myPref
mycomp(){
echo "Comparison for $5$2$4.$3"
diff -w $5$2$4.$3 $1/$5$2$4.$3
}

myDir=bench

#-----------------------------------------------------------
# 133I
myRoot=I133

myExt=txt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=read
mycomp ${myDir} ${myRoot} ${myExt}

myExt=trans
mycomp ${myDir} ${myRoot} ${myExt}

myExt=rpt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=csv mySuf=_bm
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf}

myExt=new
mycomp ${myDir} ${myRoot} ${myExt}

nbtrans=10 myExt=bs myPref=${myRoot}/beta-_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

myExt=bs mySuf=_tot myPref=${myRoot}/beta-_
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}

#-----------------------------------------------------------
# 130Cs
myRoot=Cs130

myExt=txt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=read
mycomp ${myDir} ${myRoot} ${myExt}

myExt=trans
mycomp ${myDir} ${myRoot} ${myExt}

myExt=rpt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=csv mySuf=_ecbp
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf}

myExt=new
mycomp ${myDir} ${myRoot} ${myExt}

nbtrans=12 myExt=bs myPref=${myRoot}/capt_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

nbtrans=3 myExt=bs myPref=${myRoot}/beta+_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

myExt=bs mySuf=_tot myPref=${myRoot}/beta+_
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}

#-----------------------------------------------------------
# 40K
myRoot=K40

myExt=txt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=read
mycomp ${myDir} ${myRoot} ${myExt}

myExt=trans
mycomp ${myDir} ${myRoot} ${myExt}

myExt=rpt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=csv mySuf=_ecbp
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf}

myExt=csv mySuf=_bm
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf}

myExt=new
mycomp ${myDir} ${myRoot} ${myExt}

nbtrans=1 myExt=bs myPref=${myRoot}/capt_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

nbtrans=0 myExt=bs myPref=${myRoot}/beta+_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

myExt=bs mySuf=_tot myPref=${myRoot}/beta+_
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}

nbtrans=0 myExt=bs myPref=${myRoot}/beta-_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

myExt=bs mySuf=_tot myPref=${myRoot}/beta-_
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}

#-----------------------------------------------------------
# 205Pb
myRoot=Pb205

myExt=txt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=read
mycomp ${myDir} ${myRoot} ${myExt}

myExt=trans
mycomp ${myDir} ${myRoot} ${myExt}

myExt=rpt
mycomp ${myDir} ${myRoot} ${myExt}

myExt=csv mySuf=_ecbp
mycomp ${myDir} ${myRoot} ${myExt} ${mySuf}

myExt=new
mycomp ${myDir} ${myRoot} ${myExt}

nbtrans=0 myExt=bs myPref=${myRoot}/capt_
for (( i=0; i<=${nbtrans}; i++ )); do
    mySuf=_trans$i
    mycomp ${myDir} ${myRoot} ${myExt} ${mySuf} ${myPref}
done

