Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:03

0001 #!/bin/bash
0002 usage(){ cat << EOU
0003 G4CXRenderTest.sh
0004 ===================
0005 
0006 This is not currently expected to produce meaningful renders
0007 because it lacks all the environment setup of g4cx/gxr.sh 
0008 
0009 TODO: arrange C++ defaults in a way to produce something visible 
0010 with most geometries
0011 
0012 ::
0013 
0014    ~/o/g4cx/tests/G4CXRenderTest.sh
0015    LOG=1 ~/o/g4cx/tests/G4CXRenderTest.sh
0016 
0017 
0018 EOU
0019 }
0020 
0021 
0022 cd $(dirname $(realpath $BASH_SOURCE))
0023 
0024 bin=G4CXRenderTest 
0025 source $HOME/.opticks/GEOM/GEOM.sh 
0026 
0027 vars="BASH_SOURCE GEOM bin"
0028 
0029 defarg="info_run"
0030 arg=${1:-$defarg}
0031 
0032 
0033 logging(){ 
0034    type $FUNCNAME
0035    export G4CXOpticks=INFO
0036    export U4Tree=INFO
0037 }
0038 [ -n "$LOG" ] && logging 
0039 
0040 
0041 
0042 if [ "${arg/info}" != "$arg" ]; then
0043    for var in $vars ; do printf "%20s : %s \n" "$var" "${!var}" ; done
0044 fi
0045 
0046 if [ "${arg/run}" != "$arg" ]; then
0047    ./GXTestRunner.sh $bin 
0048    [ $? -ne 0 ] && echo $BASH_SOURCE : run error && exit 1
0049 fi
0050 
0051 if [ "${arg/dbg}" != "$arg" ]; then
0052    source ../../bin/dbg__.sh 
0053    dbg__ $bin 
0054    [ $? -ne 0 ] && echo $BASH_SOURCE : dbg error && exit 2
0055 fi
0056 
0057 
0058 exit 0 
0059