Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #!/bin/bash -l 
0002 usage(){ cat << EOU
0003 gx.sh : python examination of persisted CSGFoundry and stree geometry
0004 =========================================================================
0005 
0006 After a run on workstation that persists into $HOME/.opticks/GEOM/$GEOM::
0007 
0008     GEOM       # laptop, check configured GEOM matches that on workstation
0009     GEOM get   # laptop, pullback geometry
0010     ~/opticks/g4cx/tests/gx.sh   # laptop, run this script
0011 
0012 EOU
0013 }
0014 
0015 SDIR=$(cd $(dirname $BASH_SOURCE) && pwd)
0016 script=$SDIR/gx.py 
0017 source $HOME/.opticks/GEOM/GEOM.sh   
0018 vars="BASH_SOURCE SDIR GEOM script"
0019 
0020 defarg="info_ana"
0021 arg=${1:-$defarg}
0022 
0023 if [ "${arg/info}" != "$arg" ]; then
0024    for var in $vars ; do printf "%20s : %s \n" "$var" "${!var}" ; done
0025 fi
0026 
0027 if [ "${arg/ana}" != "$arg" ]; then
0028    ${IPYTHON:-ipython} --pdb -i $script
0029    [ $? -ne 0 ] && echo $BASH_SOURCE : ana error && exit 1 
0030 fi
0031 exit 0 
0032