# echo "Setting CMT v1r12p20020606 in /exp/atlas/arnault/devcmt"
    
setenv CMTROOT /exp/atlas/arnault/devcmt/CMT/v1r12p20020606



setenv CMTBIN `uname`

if ( $?CMTCONFIG == 0 ) then
  setenv CMTCONFIG `${CMTROOT}/mgr/cmt_system.sh`
endif

if ( `basename "$SHELL"` == "tcsh" ) then
  source ${CMTROOT}/src/setup.tcsh
endif

set newpath=

foreach p ( `echo ${PATH} | sed 's#:# #g'` )
  echo ${p} | egrep '/CMT/' >& /dev/null
  set s=${status}
  if ( "${s}" != 0 ) then
    if ( ${newpath} == "" ) then
      set newpath=${p}
    else
      set newpath=${newpath}:${p}
    endif
  endif
end

setenv PATH ${newpath}:"${CMTROOT}/${CMTBIN}"
alias cmt '${CMTROOT}/${CMTBIN}/cmt.exe'

if ( $?CLASSPATH == 0) then
  setenv CLASSPATH ${CMTROOT}/java
else
  set newpath=
  foreach p ( `echo ${CLASSPATH} | sed 's#:# #g'` )
    echo ${p} | egrep '/CMT/' >& /dev/null
    set s=${status}
    if ( "${s}" != 0 ) then
      if ( ${newpath} == "" ) then
        set newpath=${p}
      else
        set newpath=${newpath}:${p}
      endif
    endif
  end

  setenv CLASSPATH ${newpath}:${CMTROOT}/java/cmt.jar
endif

alias jcmt '(java cmt_parser)'
