File indexing completed on 2025-01-30 09:15:04
0001
0002
0003
0004
0005
0006
0007
0008
0009 set -uo pipefail
0010
0011
0012 ARGC=$
0013 if [[ $ARGC -lt 2 ]]; then
0014 echo ""
0015 echo " Usage: "$0" <example> <flags> <output1> [<output2> ...]"
0016 echo ""
0017 echo " <example> is the executable name (e.g. ActsExampleFatrasGeneric)"
0018 echo " <flags> is a string containing CLI flags (e.g. \"-n 5\")"
0019 echo " <outputN> is the output name (which is the output file name without the trailing '.root')"
0020 echo ""
0021 exit 42
0022 fi
0023
0024
0025 executable="$1 $2 --output-root true"
0026 echo ${executable}
0027
0028
0029 for ((i = 3; i <= $ARGC; i++)); do
0030 eval output=\$${i}.root
0031 eval outputs[$i]=$output
0032 done
0033
0034
0035 for output in "${outputs[@]}"; do
0036 rm -f $output ST$output MT$output
0037 done
0038
0039
0040 eval "${executable}"
0041 result=$?
0042 if [[ result -ne 0 ]]; then
0043 echo "Multi-threaded run failed!"
0044 exit $result
0045 fi
0046
0047
0048 for output in "${outputs[@]}"; do
0049 mv $output MT$output
0050 done
0051
0052
0053 eval "${executable} -j 1"
0054 result=$?
0055 if [[ result -ne 0 ]]; then
0056 echo "Single-threaded run failed!"
0057 exit $result
0058 fi
0059
0060
0061 for output in "${outputs[@]}"; do
0062 mv $output ST$output
0063 done
0064
0065
0066 for output in "${outputs[@]}"; do
0067
0068 cmd="root -b -q -l -x -e '.x compareRootFiles.C(\"ST$output\", \"MT$output\")'"
0069 eval $cmd
0070 result=$?
0071
0072
0073 if [[ result -ne 0 ]]; then
0074 exit $result
0075 fi
0076
0077
0078 rm ST$output MT$output
0079 done