#!/bin/csh


# Set default software type and release to be used.
# (Variables GLAST_EXT and CMTPATH are also defined)

# The script  requires 2 argument:

# 1 - SoftRelease type
# 2 - SoftRelease version


# options commonly used:
# EngineeringModel v6r070329p17
# BeamtestRelease v2r0903p0
# BeamtestRelease v3r0907p2


setenv SOFTRELEASETYPE $1
setenv SOFTRELEASEVERSION $2

source ${HOME}/.SetSoftRelease $SOFTRELEASETYPE $SOFTRELEASEVERSION


# root environment
# It is mandatory to redefine the root environment because 
# currently (2006/07) Engineering model and beam test 
# use different root version (root 5 and root 4 respectively)


if ($SOFTRELEASETYPE == "EngineeringModel") then
setenv ROOTSYS "${GLAST_EXT}/ROOT/v4.02.00/root"
else
setenv ROOTSYS "${GLAST_EXT}/ROOT/v5.10.00/root"
endif


setenv LD_LIBRARY_PATH "${ROOTSYS}/lib:${LD_LIBRARY_PATH}"
#setenv LD_LIBRARY_PATH "${ROOTSYS}/lib" # first time it is defined...
setenv PATH "${ROOTSYS}/bin:${PATH}"

