#! /bin/csh -f

#
# csh version of a simple script to create the BaBar environment.
# This should be accessed by adding the following lines to the bottom of your
# .cshrc:
#
# if ( -f /etc/babar/setup.csh ) then
#   source /etc/babar/setup.csh
# endif
#

setenv BINTYPE Solaris

if ( -d /opt/SUNWspro ) then
  set path = ( /opt/SUNWspro/bin $path )
  if ( $?MANPATH ) then
      setenv MANPATH /opt/SUNWSpro/man:opt/SUNWste/licence_tools/man:$MANPATH
  else
      setenv MANPATH /opt/SUNWSpro/man:opt/SUNWste/licence_tools/man
  endif
endif

setenv ENVIRONMENT INTERACTIVE

setenv BFSITE ral

#setenv BFROOT /afs/slac.stanford.edu/g/babar
setenv BFROOT /afs/rl.ac.uk/bfactory
setenv BFDISTr /afs/slac.stanford.edu/g/babar/dist
setenv BFDIST $BFROOT/dist
setenv BFOVERRIDE $BFROOT/etc

setenv CVSROOT $BFROOT/repo

setenv OBJY_ARCH solaris4
#setenv OBJYBASE /usr/local/object 
# modified 11/02/00: updated the database to Objy5.2
setenv OBJYBASE /usr/object
setenv OBJY_DIR $OBJYBASE/$OBJY_ARCH

if ( -d $OBJY_DIR/bin ) then
   set path=($path $OBJY_DIR/bin)
endif

setenv CERN /cern
setenv CERN_LEVEL pro
setenv CERN_ROOT $CERN/$CERN_LEVEL

if ( -d $CERN_ROOT/bin ) then 
   set path=($path $CERN_ROOT/bin)
endif

if ( -r $BFROOT/bin/SRTstartup.csh) then
         source $BFROOT/bin/SRTstartup.csh
else 
   echo "cannot find SRTstartup.csh "
   echo " (get a new AFS token and re-run srtpath to fix this)"
endif

alias srtpath 'set  dialog=1; source $BFROOT/bin/SRTstartup.csh'
alias setboot 'source $BFDIST/releases/newest/SoftRelTools/SRTsetboot.csh'
alias analboot 'source /etc/babar/analboot.csh'

setenv RWBASE /afs/rl.ac.uk/bfactory/package/RogueWave/SunOS5-native/rogue


# I don't like doing this, but there doesn't seem to be any other 
# choice:

if ( $?LD_LIBRARY_PATH ) then
   setenv LD_LIBRARY_PATH /usr/object/solaris4/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/afs/rl.ac.uk/bfactory/package/ACE/build/ACE-5.0.4/SunOS5/ace:$LD_LIBRARY_PATH
else
   setenv LD_LIBRARY_PATH /usr/object/solaris4/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/afs/rl.ac.uk/bfactory/package/ACE/build/ACE-5.0.4/SunOS5/ace
endif
