File indexing completed on 2026-04-09 07:49:22
0001
0002 usage(){ cat << EOU
0003 ssys_test.sh
0004 =============
0005
0006 ::
0007
0008 ~/opticks/sysrap/tests/ssys_test.sh
0009
0010 EOU
0011 }
0012 cd $(dirname $(realpath $BASH_SOURCE))
0013
0014 name=ssys_test
0015 bin=${TMP:-/tmp/$USER/opticks}/$name
0016 mkdir -p $(dirname $bin)
0017
0018 defarg="build_run"
0019 arg=${1:-$defarg}
0020
0021
0022 export TEST=getenvuint64spec
0023
0024
0025 export MULTILINE=$(cat << EOV
0026
0027 red
0028 green
0029 blue
0030 cyan
0031 magenta
0032 yellow
0033 pink
0034
0035 puce
0036
0037 Pyrex/HamamatsuR12860_PMT_20inch_photocathode_mirror_logsurf/HamamatsuR12860_PMT_20inch_photocathode_mirror_logsurf/Vacuum
0038 Pyrex/NNVTMCPPMT_PMT_20inch_photocathode_mirror_logsurf/NNVTMCPPMT_PMT_20inch_photocathode_mirror_logsurf/Vacuum
0039 Pyrex/PMT_3inch_photocathode_logsurf2/PMT_3inch_photocathode_logsurf1/Vacuum
0040 Pyrex/PMT_20inch_veto_photocathode_logsurf2/PMT_20inch_veto_photocathode_logsurf1/Vacuum
0041
0042
0043 EOV
0044 )
0045
0046
0047
0048
0049 export GEOM=FewPMT
0050 export ${GEOM}_GEOMList=hamaLogicalPMT
0051 export VERSION=214
0052 export COMMANDLINE="Some-COMMANDLINE-with-spaces after the spaces start"
0053
0054
0055 export GEOM=J_2024aug27
0056 export stree__force_triangulate_solid='filepath:$HOME/.opticks/GEOM/${GEOM}_meshname_stree__force_triangulate_solid.txt'
0057
0058
0059 export ssys_test__getenviron_SIGINT=1
0060
0061
0062
0063 if [ "${arg/build}" != "$arg" ]; then
0064 echo [ $BASH_SOURCE build
0065 gcc $name.cc -g -std=c++11 -lstdc++ -I.. -o $bin
0066 [ $? -ne 0 ] && echo $BASH_SOURCE compile error && exit 1
0067 echo ] $BASH_SOURCE build
0068 fi
0069
0070 if [ "${arg/run}" != "$arg" ]; then
0071 echo [ $BASH_SOURCE run
0072 $bin
0073 [ $? -ne 0 ] && echo $BASH_SOURCE run error && exit 2
0074 echo ] $BASH_SOURCE run
0075 fi
0076
0077 if [ "${arg/dbg}" != "$arg" ]; then
0078 source dbg__.sh
0079 dbg__ $bin
0080 [ $? -ne 0 ] && echo $BASH_SOURCE dbg error && exit 3
0081 fi
0082
0083
0084 exit 0
0085