Back to home page

EIC code displayed by LXR

 
 

    


Warning, /epic-lfhcal-tbana/tools/example-env.tcsh is written in an unsupported language. File is not indexed.

0001 # Source from examples/yall/<example>/env.tcsh in the normal BNL tcsh session.
0002 set _lfhcal_env_rc = 1
0003 if ($#argv < 1) then
0004     echo "example-env.tcsh: missing example name"
0005     goto lfhcal_env_done
0006 endif
0007 set _example = "$argv[1]"
0008 set _lfhcal_workspace = "`cd ../../../.. && /bin/pwd -P`"
0009 if (-f "$_lfhcal_workspace/activate.tcsh") then
0010     unset LFHCAL_HOME
0011     setenv LFHCAL_HOME "$_lfhcal_workspace"
0012 endif
0013 if (! $?LFHCAL_HOME) then
0014     echo "Run the bootstrap from your workspace first."
0015     goto lfhcal_env_done
0016 endif
0017 if (! -f "$LFHCAL_HOME/activate.tcsh") then
0018     echo "LFHCal environment not installed at $LFHCAL_HOME."
0019     goto lfhcal_env_done
0020 endif
0021 source "$LFHCAL_HOME/activate.tcsh"
0022 if ($status != 0) goto lfhcal_env_done
0023 
0024 setenv LFHCAL_EXAMPLE "$_example"
0025 setenv LFHCAL_EXAMPLE_WORK "$LFHCAL_WORK/$_example"
0026 # Never create directories under LFHCAL_DATA: it is shared input only.
0027 mkdir -p "$LFHCAL_EXAMPLE_WORK" "$LFHCAL_WORK/campaigns"
0028 if ($status != 0) goto lfhcal_env_done
0029 
0030 echo "LFHCAL_HOME=$LFHCAL_HOME"
0031 echo "EIC_SHELL=$EIC_SHELL"
0032 echo "Example work=$LFHCAL_EXAMPLE_WORK"
0033 set _lfhcal_env_rc = 0
0034 
0035 lfhcal_env_done:
0036 unset _example _lfhcal_workspace
0037 # Keep this last, outside every conditional. Do not exit a sourcing shell.
0038 /bin/test "$_lfhcal_env_rc" -eq 0