##################################################
#
# Mokka initilization script for the SLC4 LXPLUS and LXBATCH
#
##################################################


# Set the PWD to the G4WORKDIR, source this from the Mokka basedir
export G4WORKDIR=${PWD}


####################################################################################################
#geant4 setup script from the G4 Directory
#This also sets up the clhep variable
####source /afs/cern.ch/sw/geant4/releases/specific/slc4_amd64/gcc-3.4.6/geant4.9.2.ref02/setup.sh
#
# This part is a copy from above mentioned file with a fix for the XERCESROOT variable that is missing from that file
#

# Configuration parameters, for release
#
g4version="geant4.9.2.ref02"
g4releases=/afs/cern.ch/sw/geant4/releases
clhep=/afs/cern.ch/sw/lcg/external/clhep
XercesC=/afs/cern.ch/sw/lcg/external/XercesC

# Configuration parameters, for system and compiler
#
gccversion="3.4.6"
os="slc4_amd64_gcc34"
EXTRALIBS="-L/usr/X11R6/lib64"
export EXTRALIBS
clhepversion="2.0.4.2"
XercesCversion="2.8.0"

g++ --version | grep $gccversion > /dev/null
#echo `g++ --version` | grep $gccversion
if [ $? != 0 ]
then
  echo "It looks like your compiler settings are not suitable"
  echo "The Operating system is expected to be $os"
  echo    "The compiler version should be g++ (GCC) $gccversion"
  echo -n "The system reports that it is  "; g++ --version
  echo "Please set your PATH and LD_LIBRARY_PATH environment variables"

else

export XERCESCROOT=${XercesC}/${XercesCversion}/$os

echo "Setting up the environment for $g4version"
G4SYSTEM=Linux-g++
G4INSTALL=$g4releases/share/$g4version
G4LIB=$g4releases/specific/$os/$g4version/lib
CLHEP_BASE_DIR=$clhep/$clhepversion/$os
export G4SYSTEM G4INSTALL G4LIB CLHEP_BASE_DIR

G4LEDATA="$G4INSTALL/data/G4EMLOW"
G4NEUTRONHPDATA="$G4INSTALL/data/G4NDL"
G4LEVELGAMMADATA="$G4INSTALL/data/PhotonEvaporation"
G4RADIOACTIVEDATA="$G4INSTALL/data/RadioactiveDecay"
G4ELASTICDATA="$G4INSTALL/data/G4ELASTIC"
G4ABLADATA="$G4INSTALL/data/G4ABLA"
export G4LEDATA G4NEUTRONHPDATA G4LEVELGAMMADATA G4RADIOACTIVEDATA G4ELASTICDATA G4ABLADATA

# Geant 4 interface, visualisation and other variables
G4UI_USE_TERMINAL=1
G4UI_USE_TCSH=1
G4UI_USE_GAG=1
G4UI_USE_XAW=1
G4UI_USE_XM=1
#
G4VIS_USE_DAWN=1
G4VIS_USE_DAWNFILE=1
G4VIS_USE_OPENGLX=1
G4VIS_USE_OPENGLXM=1
G4VIS_USE_RAYTRACER=1
G4VIS_USE_RAYTRACERX=1
G4VIS_USE_VRML=1
G4VIS_USE_VRMLFILE=1
#
G4LIB_USE_G3TOG4=1

# Geant 4 build variables
G4VIS_BUILD_VRML_DRIVER=1
G4UI_BUILD_XAW_SESSION=1
G4UI_BUILD_XM_SESSION=1
G4LIB_BUILD_G3TOG4=1
G4VIS_BUILD_OPENGLX_DRIVER=1
G4VIS_BUILD_RAYTRACERX_DRIVER=1
G4VIS_BUILD_OPENGLXM_DRIVER=1
G4UI_BUILD_TERMINAL_SESSION=1
G4UI_BUILD_GAG_SESSION=1
G4VIS_BUILD_RAYTRACER_DRIVER=1
G4VIS_BUILD_DAWNFILE_DRIVER=1
G4VIS_BUILD_DAWN_DRIVER=1
G4VIS_BUILD_VRMLFILE_DRIVER=1
G4LIB_BUILD_GDML=1

export G4UI_USE_TERMINAL G4UI_USE_TCSH G4UI_USE_GAG G4UI_USE_XAW G4UI_USE_XM
export G4VIS_USE_DAWN G4VIS_USE_DAWNFILE G4VIS_USE_OPENGLX G4VIS_USE_OPENGLXM
export G4VIS_USE_RAYTRACER G4VIS_USE_RAYTRACERX G4VIS_USE_VRML G4VIS_USE_VRMLFILE
export G4LIB_USE_G3TOG4

export G4VIS_BUILD_VRML_DRIVER G4UI_BUILD_XAW_SESSION G4UI_BUILD_XM_SESSION 
export G4LIB_BUILD_G3TOG4 G4VIS_BUILD_OPENGLX_DRIVER
export G4VIS_BUILD_RAYTRACERX_DRIVER G4VIS_BUILD_OPENGLXM_DRIVER
export G4UI_BUILD_TERMINAL_SESSION G4UI_BUILD_GAG_SESSION
export G4VIS_BUILD_RAYTRACER_DRIVER
export G4VIS_BUILD_DAWNFILE_DRIVER G4VIS_BUILD_DAWN_DRIVER
export G4VIS_BUILD_VRMLFILE_DRIVER G4LIB_BUILD_GDML

if [ $LD_LIBRARY_PATH ]
then
    LD_LIBRARY_PATH=${G4LIB}:${CLHEP_BASE_DIR}/lib:${XERCESCROOT}/lib:${LD_LIBRARY_PATH}
else
    LD_LIBRARY_PATH=${G4LIB}:${CLHEP_BASE_DIR}/lib:${XERCESCROOT}/lib
fi
export LD_LIBRARY_PATH

if [ $G4WORKDIR ]
then
   echo "G4WORKDIR already set"   
else
   echo "Setting G4WORKDIR"
   G4WORKDIR=$HOME/geant4/$g4version/$os
   export G4WORKDIR
fi

if [ ! -d $G4WORKDIR ]
then
   echo "Creating the G4WORKDIR directory $G4WORKDIR"
   mkdir -p $G4WORKDIR
fi

# The following is used to store your executables 
#            (in subdirectories, one per system)
if [ $G4BIN ]
then
  echo "G4BIN already set"
else

  G4BIN=$G4WORKDIR/bin;export G4BIN
fi

fi
####################################################################################################



#Have to set the #G4System
export G4SYSTEM="Linux-g++"

#Need MYSQL

export MYSQL_PATH=/afs/cern.ch/sw/lcg/external/mysql/5.0.18/slc4_amd64_gcc34
export MYSQL_LIBDIR=${MYSQL_PATH}/lib
export MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock
export PATH=${MYSQL_PATH}/include:$PATH
export PATH=${MYSQL_PATH}/bin:$PATH
export LD_LIBRARY_PATH=${MYSQL_PATH}/lib:${LD_LIBRARY_PATH}

#Set other CLHEP Variables
export CLHEP=${clhep}/2.0.4.2/slc4_amd64_gcc34
#export CLHEP_BASE_DIR=${CLHEP}
export LD_LIBRARY_PATH=${CLHEP}/lib:${LD_LIBRARY_PATH}
export PATH=${CLHEP}/include:$PATH

#LCSoft on the CLIC AFS-SPACE
export LCSoft="/afs/cern.ch/eng/clic/software/ilcsoft/v01-06"

#LCIO/afs/cern.ch/sw/geant4/releases/specific/slc4_amd64/gcc-3.4.6/geant4.9.2.ref02/setup.sh
export LCIO="${LCSoft}/lcio/v01-11"
export LD_LIBRARY_PATH=${LCIO}/lib:${LD_LIBRARY_PATH}

#GEAR
export GEAR=${LCSoft}/gear/v00-11-01
export LD_LIBRARY_PATH=${GEAR}/lib:$LD_LIBRARY_PATH



#Path to the Mokka installation
export PATH=/afs/cern.ch/eng/clic/software/Mokka/mokka-06-07-patch03/bin/Linux-g++:${PATH}

echo "Done setting up the Mokka environment"

-- AndreSailer - 20 Mar 2009

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2009-03-24 - AndreSailer
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CLIC All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback