#!/bin/csh

#-----------------------------------------------------------------------
# C shell environment setup script for Geant4 9.6.2
#
# This script will configure your environment to provide a setup which 
# can be used to build user applications using the old Geant4 GNUmakefile 
# build system, but with a CMake build or install of Geant4.
#
# This script is autogenerated by CMake DO NOT EDIT
#

#-----------------------------------------------------------------------
# Locate directory of self
#
# Self locate script when sourced
# If sourced interactively, we can use $_ as this should be
#
#   source path_to_script_dir/geant4make.csh
#
set ARGS=($_)
if ("$ARGS" != "") then
  set g4sls_sourced_dir="`dirname ${ARGS[2]}`"
else
  # Oh great, we were sourced non-interactively. This means that $_
  # won't be set, so we need an external source of information on
  # where the script is located.
  # We obtain this in one of two ways:
  #   1) Current directory:
  #     cd script_dir ; source geant4make.csh
  #
  #   2) Supply the directory as an argument to the script:
  #     source script_dir/geant4make.csh script_dir
  #
  if ( -e geant4make.csh ) then
    set g4sls_sourced_dir="`pwd`"
  else if ( "$1" != "" )  then
    if ( -e ${1}/geant4make.csh ) then
      set g4sls_sourced_dir=${1}
    else
      echo "ERROR ${1} does not contain a Geant4 installation"
    endif
  else
    unset g4sls_sourced_dir
    echo "ERROR: geant4make.csh could NOT self-locate Geant4 installation"
    echo "because it was sourced (i.e. embedded) in another script."
    echo "This is due to limitations of (t)csh but can be worked around by providing"
    echo "the directory where geant4make.csh is located"
    echo "to it, either via cd-ing to the directory before sourcing:"
    echo "  cd where_script_is ; source geant4make.csh"
    echo "or by supplying the directory as an argument to the script:"
    echo "  source where_script_is/geant4make.csh where_script_is"
    echo " "
  endif
endif

if ($?g4sls_sourced_dir) then
  set geant4make_root="`cd ${g4sls_sourced_dir} > /dev/null ; pwd`"
endif

if (${?g4sls_sourced_dir}) then
#-----------------------------------------------------------------------
# Cleanup any existing known environment variables
# NB: It won't help with resetting paths!!
#
# - Core Variables
unsetenv  G4INSTALL
unsetenv  G4SYSTEM
unsetenv  G4INCLUDE
unsetenv  G4LIB
unsetenv  G4DEBUG

# - Library build options
unsetenv  G4LIB_BUILD_SHARED
unsetenv  G4LIB_BUILD_STATIC
unsetenv  G4LIB_USE_DLL
unsetenv  G4LIB_USE_GRANULAR

# - Optional component build
#
# - CLHEP options
unsetenv  CLHEP_BASE_DIR
unsetenv  CLHEP_INCLUDE_DIR
unsetenv  CLHEP_LIB
unsetenv  CLHEP_LIB_DIR

# - G3ToG4
unsetenv  G4LIB_BUILD_G3TOG4
unsetenv  G4LIB_USE_G3TOG4

# - ZLIB options
unsetenv  G4LIB_BUILD_ZLIB
unsetenv  G4LIB_USE_ZLIB

# - GDML Options
unsetenv  G4LIB_BUILD_GDML
unsetenv  G4LIB_USE_GDML
unsetenv  XERCESCROOT

# - UI Build and Use options
# USE options only for applications.
unsetenv  G4UI_NONE
unsetenv  G4UI_BUILD_QT_SESSION
unsetenv  G4UI_BUILD_WIN32_SESSION
unsetenv  G4UI_BUILD_XAW_SESSION
unsetenv  G4UI_BUILD_XM_SESSION

unsetenv  G4UI_USE_TCSH
unsetenv  G4UI_USE_WIN32
unsetenv  G4UI_USE_XAW
unsetenv  G4UI_USE_XM
unsetenv  G4UI_USE_QT

#- VIS Build and Use options
# Only USE options matter for applications.
unsetenv  G4VIS_NONE

# - Network DAWN driver
unsetenv  G4VIS_BUILD_DAWN_DRIVER
unsetenv  G4VIS_USE_DAWN

# - Network VRML driver
unsetenv  G4VIS_BUILD_VRML_DRIVER
unsetenv  G4VIS_USE_VRML

# - OpenInventor driver
unsetenv  G4VIS_BUILD_OIWIN32_DRIVER
unsetenv  G4VIS_USE_OIWIN32
unsetenv  G4VIS_BUILD_OIX_DRIVER
unsetenv  G4VIS_USE_OIX

# - OpenGL drivers
unsetenv  G4VIS_BUILD_OPENGLQT_DRIVER
unsetenv  G4VIS_USE_OPENGLQT

unsetenv  G4VIS_BUILD_OPENGLWIN32_DRIVER
unsetenv  G4VIS_USE_OPENGLWIN32

unsetenv  G4VIS_BUILD_OPENGLXM_DRIVER
unsetenv  G4VIS_USE_OPENGLXM

unsetenv  G4VIS_BUILD_OPENGLX_DRIVER
unsetenv  G4VIS_USE_OPENGLX

# - Raytracer X11
unsetenv  G4VIS_BUILD_RAYTRACERX_DRIVER
unsetenv  G4VIS_USE_RAYTRACERX


#-----------------------------------------------------------------------
# System description and standard install paths
#
setenv G4SYSTEM Linux-g++
setenv G4INSTALL /home/mice/Grid/MAUS-v3.1.3/third_party/source/geant4.9.6.p02
setenv G4INCLUDE /home/mice/Grid/MAUS-v3.1.3/third_party/source/geant4.9.6.p02/this_is_a_deliberate_dummy_path
setenv G4LIB /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/outputs/library

if ( ! ${?LD_LIBRARY_PATH} ) then
  setenv LD_LIBRARY_PATH /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/outputs/library/Linux-g++
else
  setenv LD_LIBRARY_PATH /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/outputs/library/Linux-g++:${LD_LIBRARY_PATH}
endif
      

#-----------------------------------------------------------------------
# User's G4WORKDIR
#

if ( ! ${?G4WORKDIR} ) then
  setenv G4WORKDIR $HOME/geant4_workdir
endif


if ( ! ${?PATH} ) then
  setenv PATH ${G4WORKDIR}/bin/${G4SYSTEM}
else
  setenv PATH ${G4WORKDIR}/bin/${G4SYSTEM}:${PATH}
endif
      

#-----------------------------------------------------------------------
# Library build setup
#
setenv G4LIB_BUILD_SHARED 1



#-----------------------------------------------------------------------
# Resource file paths
#
setenv G4NEUTRONHPDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/G4NDL4.2
setenv G4LEDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/G4EMLOW6.32
setenv G4LEVELGAMMADATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/PhotonEvaporation2.3
setenv G4RADIOACTIVEDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/RadioactiveDecay3.6
setenv G4NEUTRONXSDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/G4NEUTRONXS1.2
setenv G4PIIDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/G4PII1.3
setenv G4REALSURFACEDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/RealSurface1.0
setenv G4SAIDXSDATA /home/mice/Grid/MAUS-v3.1.3/third_party/build/geant4.9.6.p02/data/G4SAIDDATA1.1


#-----------------------------------------------------------------------
# Optional components.
#
#-----------------------------------------------------------------------
# CLHEP setup
#
# USING INTERNAL CLHEP





#-----------------------------------------------------------------------
# ZLIB Setup
#
setenv G4LIB_USE_ZLIB 1


#-----------------------------------------------------------------------
# GDML Setup
#
setenv G4LIB_USE_GDML 1
setenv XERCESCROOT /home/mice/Grid/MAUS-v3.1.3/third_party/install

#-----------------------------------------------------------------------
# G3ToG4 Setup
#
# NOT BUILT WITH G3TOG4 SUPPORT

#-----------------------------------------------------------------------
# USER INTERFACE AND VISUALIZATION MODULES
#
#-----------------------------------------------------------------------
# Terminal UI
setenv G4UI_USE_TCSH 1
# WIN32 TERMINAL UI NOT AVAILABLE ON Linux

#-----------------------------------------------------------------------
# Qt UI/Vis
#
# NOT BUILT WITH QT INTERFACE


#-----------------------------------------------------------------------
# Xm UI/Vis
#
# NOT BUILT WITH XM INTERFACE


#-----------------------------------------------------------------------
# Network DAWN driver
#
# NOT BUILT WITH NETWORK DAWN SUPPORT

#-----------------------------------------------------------------------
# Network VRML driver
#
# NOT BUILT WITH NETWORK VRML SUPPORT

#-----------------------------------------------------------------------
# OpenInventor
#
# NOT BUILT WITH INVENTOR SUPPORT

#-----------------------------------------------------------------------
# X11 OpenGL
#
# NOT BUILT WITH OPENGL(X11) SUPPORT

#-----------------------------------------------------------------------
# Win32 OpenGL
#
# NOT BUILT WITH OPENGL(WIN32) SUPPORT

#-----------------------------------------------------------------------
# X11 Raytracer 
#
# NOT BUILT WITH RAYTRACER(X11) SUPPORT

#-----------------------------------------------------------------------
endif
