File indexing completed on 2026-04-10 07:49:32
0001
0002 usage(){ cat << EOU
0003
0004
0005 ~/o/CSGOptiX/tests/CSGOptiXServiceTest.sh
0006
0007 BP=SEvent::MakeTorchGenstep CSGOptiX/tests/CSGOptiXServiceTest.sh dbg
0008
0009
0010 EOU
0011 }
0012
0013 cd $(dirname $(realpath $BASH_SOURCE))
0014
0015 bin=CSGOptiXServiceTest
0016 source $HOME/.opticks/GEOM/GEOM.sh
0017
0018
0019
0020 export OPTICKS_RUNNING_MODE=SRM_TORCH
0021 export storch_FillGenstep_type=sphere
0022 export storch_FillGenstep_radius=100
0023 export storch_FillGenstep_pos=0,0,0
0024 export storch_FillGenstep_distance=1.00
0025
0026 export OPTICKS_NUM_PHOTON=M1
0027 export OPTICKS_NUM_EVENT=1
0028 export OPTICKS_NUM_GENSTEP=1
0029
0030
0031
0032 export OPTICKS_EVENT_MODE=Hit
0033 export OPTICKS_HIT_MASK=EC
0034
0035
0036
0037
0038 vars="BASH_SOURCE PWD bin GEOM defarg arg"
0039
0040 defarg="info_run"
0041 arg=${1:-$defarg}
0042
0043 if [ "${arg/info}" != "$arg" ]; then
0044 for var in $vars ; do printf "%20s : %s \n" "$var" "${!var}" ; done
0045 fi
0046
0047 if [ "${arg/run}" != "$arg" ]; then
0048 $bin
0049 [ $? -ne 0 ] && echo $BASH_SOURCE : run error && exit 1
0050 fi
0051
0052 if [ "${arg/dbg}" != "$arg" ]; then
0053 source dbg__.sh
0054 dbg__ $bin
0055 [ $? -ne 0 ] && echo $BASH_SOURCE : dbg error && exit 2
0056 fi
0057
0058
0059 exit 0
0060