BNMR: Experimental Setup: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
m (Bsmith moved page DaqWiki:BNMR: Experimental Setup to BNMR: Experimental Setup without leaving a redirect)
No edit summary
 
Line 1: Line 1:
{{Pagelinks}}
{{Pagelinks}}
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[BNMR]]
*
* [[BNMR: Experimental Modes|Experimental Modes]]
* [[BNMR: Getting Started|Getting Started]]
</div>


== Introduction ==
== Introduction ==
Line 16: Line 9:


== NIS ISAC Cluster ==
== NIS ISAC Cluster ==
Both these desktops run NIS and are part of the ISAC cluster. The  "master" computer is '''''isdaq00''''' (located in the Computing Services server room). ''isdaq00'' is the  main file server and hosts the home directories for the cluster. The VMIC cpus (''lxbnqr,lxbnmr'') and the CAMP VxWorks cpus (''bnmrvw,polvw'') also mount home directories served by isdaq00.  These machines (isdaq00, isdaq01, isdaq06) are on UPS.
Both these desktops run NIS and are part of the ISAC cluster. The  "master" computer is '''''isdaq00''''' (located in the Computing Services server room). ''isdaq00'' is the  main file server and hosts the home directories for the cluster. The VMIC CPUs (''lxbnqr,lxbnmr'') and the CAMP VxWorks CPUs (''bnmrvw,polvw'') also mount home directories served by isdaq00.  These machines (isdaq00, isdaq01, isdaq06) are on UPS.
;Note :Unless '''''isdaq00''''' is up and running, and the '''network''' is working, it will be impossible to run the experiments.
;Note :Unless '''''isdaq00''''' is up and running, and the '''network''' is working, it will be impossible to run the experiments.


== Experimental setup ==
== Experimental setup ==
Two accounts with usernames "bnmr" and "bnqr" have been set up to run the {{bnmqr|join=and}} experiments. These accounts run the '''tshell''', and the files /home/[[BNMR#Nomenclature|<beamline>]]/.cshrc contain the required setup for the experiments (see [[#File .cshrc]]). The ~/.login file (executed when logging in interactively) contains requried EPICS fonts (see [[#File .cshrc]]). Users may add more definitions to these files, but should not change any of the DAQ definitions or their experiments may fail to run properly.
Two accounts with usernames <code>bnmr</code> and <code>bnqr</code> have been set up to run the {{bnmqr|join=and}} experiments. These accounts run the <code>bash</code> shell, and the files /home/[[BNMR#Nomenclature|<beamline>]]/.bashrc contain the required setup for the experiments (see [[#File .bahrc]]). The ~/.login file (executed when logging in interactively) contains required EPICS fonts (see [[#File .login]]). Users may add more definitions to these files, but should not change any of the DAQ definitions or their experiments may fail to run properly.


== Physica ==
== Physica ==
Scripts to run physica are in directory /home/[[BNMR#Nomenclature|<beamline>]]/bin This directory also contains links to run {{File|name=bnmrfit, campvarlog}} and {{File|name=lcrplot}}. This directory is included in the PATH (hence no alias is defined). A '''local copy''' of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6).
Scripts to run physica are in directory /home/[[BNMR#Nomenclature|<beamline>]]/bin This directory also contains links to run {{File|name=bnmrfit, campvarlog}} and {{File|name=lcrplot}}. This directory is included in the PATH (hence no alias is defined). A '''local copy''' of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6).


Environment variables required for physica defined in .cshrc are shown in Table 3 below.
Environment variables required for physica defined in .bashrc are shown in Table 3 below.
 
 


== Environment Variables ==
== Environment Variables ==
There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These
There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These
are defined in [[#File .cshrc|.cshrc]]. This file is executed at login.  
are defined in [[#File .bashrc|.bashrc]]. This file is executed at login.  


Some of the environment variables needed for data acquistion are :
Some of the environment variables needed for data acquisition are:
* DAQ setup (Table 1)
* DAQ setup (Table 1)
* MIDAS setup (Table 2)  
* MIDAS setup (Table 2)  
Line 85: Line 76:
|- style="text-align:center; background-color:silver"
|- style="text-align:center; background-color:silver"
! Name !!Purpose !!Value
! Name !!Purpose !!Value
|-
|- style="background-color:whitesmoke"
| EPICS_BASE || path of EPICS package || /home/midas/packages/epics-base
| EPICS_BASE || path of EPICS package || /home/midas/packages/epics-base
|-  style="background-color:whitesmoke"
|-   
| EPICS_HOST_ARCH|| host architecture || linux-x86_64
| EPICS_HOST_ARCH|| host architecture || linux-x86_64
|-
| FE_EPICS || path of MIDAS client fe_epics || /home/bnmr/epics
|-  style="background-color:whitesmoke"
|-  style="background-color:whitesmoke"
| EPICS_PATH || path of EPICS utilities ||  /home/midas/packages/epics-base/bin/linux-x86_64
| EPICS_PATH || path of EPICS utilities ||  /home/midas/packages/epics-base/bin/linux-x86_64
Line 129: Line 118:


== Aliases ==
== Aliases ==
A number of useful aliases that run various scripts or start programs are defined in [[#File .cshrc|.cshrc]], e.g.
A number of useful aliases that run various scripts or start programs are defined in [[#File .bashrc|.bashrc]], e.g.
* [[BNMR: Scripts#start-all|start-all]] runs a script to start missing MIDAS clients
* [[BNMR: Scripts#start-all|start-all]] runs a script to start missing MIDAS clients
* [[BNMR: Scripts#kill-all|kill-all]] runs a script to kill all MIDAS clients
* [[BNMR: Scripts#kill-all|kill-all]] runs a script to kill all MIDAS clients
* [[BNMR: Scripts#show-windows|show-windows]] runs a script to show the client windows for clients frontend, mdarc and mheader
* [[BNMR: Scripts#show-windows|show-windows]] runs a script to show the client windows for clients frontend, mdarc and mheader
* [[BNMR: cleanup]] runs a program to perform the end-of-run clean up and archive procedure on saved run files.
* [[BNMR: CAMP#CAMP User Interface|camp]] runs the CAMP user interface
* [[BNMR: CAMP#CAMP User Interface|camp]] runs the CAMP user interface
* [[BNMR: mud_util]] runs the MUD utility program


== File .cshrc ==
== File .bashrc ==
The parts of the ~/.cshrc file relevent to DAQ is shown below:
The parts of the ~/.bashrc file relevent to DAQ is shown below:
<pre>
<pre>
# file:  .cshrc
# .bashrc
........
## we do not use ROOT# ROOT
unsetenv ROOTSYS
 
# required fonts for EPICS are in .login
 
# clear these to start with
unsetenv LD_LIBRARY_PATH_ROOT
unsetenv LD_LIBRARY_PATH
 
# The MIDAS experiment (bnmr/bnqr) is running on $DAQ_HOST
setenv DAQ_HOST isdaq01
## setenv DAQ_HOST isdaq06  ## alternative host
##        (also has permission to write to EPICS)
##  When changing host,  also remove or edit
## /home/$BEAMLINE/vmic_online/$BEAMLINE/.SHM_HOST.TXT
#
 
# set up long host name(s)
set triumf=".triumf.ca"
# needed for message in .login
setenv daq_host $DAQ_HOST$triumf
 
setenv MIDASSYS $HOME/packages/midas
# standard MUSR cvs version (post-Ted)
setenv MUSR_DIR /home/musrdaq/musr
 
# EPICS base 3.14.12 (installed under midas/packages/epics-base
# EPICS_CA_* environment variables defined below (independent of version)
setenv EPICS_BASE /home/midas/packages/epics-base
 
if (($LOGNAME == "bnmr") || ($LOGNAME == "bnqr")) then
  setenv BEAMLINE $LOGNAME
  setenv VMIC_HOST lx$BEAMLINE  # VMIC hostname (also used in some makefiles)
  setenv vmic_host $VMIC_HOST$triumf  # long name
endif
 
setenv ONLINE vmic_online  # online is now a softlink to vmic_online
 
 
# Specific to DAQ machines  DAQ_HOST and VMIC_HOST
switch (`hostname`)
case $DAQ_HOST*:
case $VMIC_HOST*:
 
  setenv MIDAS_EXPT_NAME $BEAMLINE
 
  # Assign MSERVER_PORT
  # MSERVER_PORT also used in start-daq-tasks-bn[mq]r
  switch  ($BEAMLINE)
    case bnmr:
      setenv MSERVER_PORT 1176
      breaksw
    case bnqr:
      setenv MSERVER_PORT 1177
    endsw
 
  # setup the MIDAS mserver
  switch (`hostname`)
  case $DAQ_HOST*:
      unsetenv MIDAS_SERVER_HOST
      setenv MIDAS_EXPTAB  $HOME/$ONLINE/exptab
      breaksw
  case $VMIC_HOST*:
      # MIDAS server port for this beamline is $MSERVER_PORT
      # needed for $VMIC_HOST to communicate with $DAQ_HOST
      setenv MIDAS_SERVER_HOST $daq_host":"$MSERVER_PORT
      if ( $BEAMLINE == "bnmr") then
        setenv FECOL azure
      else
        setenv FECOL mintcream
      endif
  endsw
endsw  #  end of DAQ_HOST and VMIC_HOST


# select 64-bit or 32-bit MIDAS
# User specific aliases and functions
switch (`uname -i`)
case i386:
    setenv LINUX linux-m32
    setenv EPICS_HOST_ARCH linux-x86
    setenv CAMP_DIR $MUSR_DIR/camp/linux-m32
    alias  start-fe $HOME/$ONLINE/$BEAMLINE/bin/start_fe$BEAMLINE
    alias  kill-fe  'perl $HOME/$ONLINE/$BEAMLINE/bin/kill_fe$BEAMLINE.pl'
    breaksw
default:
    setenv LINUX linux
    setenv EPICS_HOST_ARCH linux-x86_64
    setenv CAMP_DIR $MUSR_DIR/camp/linux
    alias  cleanup  $HOME/bin/cleanup
    #MUD_UTIL  MUD is only built 64 bit
    setenv MUD_UTIL $MUSR_DIR/mud/bin
    alias mud_util $MUD_UTIL/mud_util
endsw


# Specific to $DAQ_HOST  DAQ machine
# Source global definitions
if ( ($HOST == $DAQ_HOST) ||(  $HOST == $daq_host)) then
if [ -f /etc/bashrc ]; then
    alias start_autoruns  ~musrdaq/musr/musr_midas/mui/autoruns.tcl
. /etc/bashrc
    # softlink $HOME/epics now points to $HOME/vmic_online/epics
fi
    setenv FE_EPICS $HOME/epics
    alias start-all ~/$ONLINE/$BEAMLINE/bin/start-daq-tasks-$BEAMLINE
    alias kill-all ~/$ONLINE/$BEAMLINE/bin/kill-all
    alias show-windows  ~/$ONLINE/$BEAMLINE/bin/show-windows
    alias start_mhttpd ~/$ONLINE/$BEAMLINE/bin/start_mhttpd
    alias restart_mhttpd ~/$ONLINE/$BEAMLINE/bin/restart_mhttpd
    # alias for serial debug port for MVME162 CAMP board via terminal server
    alias ppc2 '~/$ONLINE/vw_console/start_pol_mvme162 $BEAMLINE'


  if ( $BEAMLINE == "bnmr") then
export PS1='(bash) [\u@\h \W]\$ '
      setenv FGCOL white
      setenv BGCOL blue
      setenv FECOL azure
    else
      setenv FGCOL white
      setenv BGCOL lightseagreen
      setenv FECOL mintcream
    endif


else  # NOT $DAQ_HOST
alias tnt2k1='rdesktop -f tnt2k.triumf.ca'
    alias start-all echo "This is $HOST. Run start-all from $DAQ_HOST."
alias mycommd='sh cmds'
    alias kill-all  echo "This is $HOST.  Run kill-all from $DAQ_HOST."
alias phys='/home/bnmr/packages/physica/physica &'
endif


setenv MIDAS_LINUX $MIDASSYS/$LINUX
#Passwordless access for bnmrpc
setenv EPICS_PATH $EPICS_BASE/bin/$EPICS_HOST_ARCH
alias gobnmrpc='vncviewer bnmrpc -passwd ~/.vnc/passwd'
setenv LD_LIBRARY_PATH ${EPICS_BASE}/lib/$EPICS_HOST_ARCH
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/musrdaq/lib


setenv PATH $MIDAS_LINUX/bin:${PATH}:.
unset SHELL
setenv PATH ${PATH}:${EPICS_PATH}:${CAMP_DIR}
export HOST=`hostname`
setenv PATH ${PATH}:$HOME/scripts:$HOME/bin
export MIDAS_EXPT_NAME=bnmr
# use own copy of physica;  /triumfcs/linux/physica does not work
export MIDAS_EXPTAB=/home/bnmr/online/exptab
export DAQ_HOST=isdaq01
export VMIC_HOST=lxbnmr


export MIDASSYS=$HOME/cycling_dev/packages/midas_oct2020
export EPICS_BASE=/home/midas/packages/epics-base
export MUSR_DIR=/home/musrdaq/musr


# EPICS any base
# For python3
setenv EPICS_CA_AUTO_ADDR_LIST YES
export PATH=$PATH:$HOME/.local/bin
setenv EPICS_CA_ADDR_LIST 142.90.133.255
export PYTHONPATH=$PYTHONPATH:~/cycling_dev/packages/benmr
setenv EPICS_CA_REPEATER_PORT 9003
setenv EPICS_CA_SERVER_PORT 9004
setenv EPICS_CA_AUTO_LIST NO
setenv EPICS_CA_ADDR_PORT 142.90.130.27
#


alias autoruns=/home/bnmr/cycling_dev/packages/mui/autoruns.tcl
alias campvarlog=/home/bnmr/cycling_dev/packages/mui/bnmr_logger.tcl


alias check_host ~/$ONLINE/$BEAMLINE/bin/check-host-$BEAMLINE
alias muddiff="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/diff_mud_files.py"
#
alias muddump="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/dump_mud_file.py"


#CAMP
triumf=".triumf.ca"
setenv CAMP_HELP $CAMP_DIR
export daq_host=$DAQ_HOST$triumf
setenv CAMP_HOST polvw.triumf.ca
export vmic_host=$VMIC_HOST$triumf
alias camp_cmd $CAMP_DIR/camp_cmd
alias camp    $CAMP_DIR/camp_cui


unset MIDAS_LINUX


set history = 500
if [ $HOST == $VMIC_HOST ] || [ $HOST == $vmic_host ]; then
setenv CERN_ROOT /cern/pro
  # lxbnmr - talk to isdaq01 through mserver
setenv NODE `hostname`
  #export MIDAS_SERVER_HOST=$DAQ_HOST":7072"
setenv EXINIT 'set redraw wm=8'
  export MIDAS_SERVER_HOST=$DAQ_HOST":1195"
  export PATH=$MIDASSYS/linux-m32/bin:/triumfcs/linux/bin:/home/bnmr/cycling_dev/packages/benmr/bin:$PATH
  export EPICS_HOST_ARCH=linux-x86
  export CAMP_DIR=$MUSR_DIR/camp/linux-m32
  export EPICS_CA_AUTO_ADDR_LIST=YES
  export EPICS_CA_ADDR_LIST=142.90.133.255
  export EPICS_CA_REPEATER_PORT=9003
  export EPICS_CA_SERVER_PORT=9004
  export EPICS_CA_AUTO_LIST=NO
  export EPICS_CA_ADDR_PORT=142.90.130.27
#  export EPICS_CA_AUTO_ADDR_LIST=NO
#  export EPICS_CA_ADDR_LIST=142.90.132.202
#  export EPICS_CA_REPEATER_PORT=9093
#  export EPICS_CA_SERVER_PORT=9094
fi


setenv HP_LASER las61
if [ $HOST == $DAQ_HOST ] || [ $HOST == $daq_host ]; then
setenv PRINTER las61
  # isdaq01 - main host
  source scl_source enable devtoolset-8
  source scl_source enable rh-python36
  export PYTHONPATH=$MIDASSYS/python:$DAQ_DIR:$PYTHONPATH
  export PATH=$MIDASSYS/bin:/home/bnmr/cycling_dev/packages/midas_tcl:/home/bnmr/cycling_dev/packages/benmr/bin:/home/bnmr/cycling_dev/packages/lcrp64:$PATH
  unset MIDAS_SERVER_HOST
  export EPICS_HOST_ARCH=linux-x86_64
  export CAMP_DIR=$MUSR_DIR/camp/linux
  export EPICS_CA_AUTO_ADDR_LIST=NO
  export EPICS_CA_ADDR_LIST=142.90.132.202
  export EPICS_CA_REPEATER_PORT=9093
  export EPICS_CA_SERVER_PORT=9094
fi


# Physica - use small scripts in ~/bin
export EPICS_PATH=$EPICS_BASE/bin/$EPICS_HOST_ARCH
# To run bnmrfit, use bnmrfit script, not "physica"
export LD_LIBRARY_PATH=${EPICS_BASE}/lib/$EPICS_HOST_ARCH
setenv TRIUMF_TERMINAL_TYPE x
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/musrdaq/lib
setenv TRIUMF_PLOTTER_TYPE hp
setenv TRIUMF_FONTS  ${HOME}/physica/fonts
setenv PHYSICA_INIT  ${HOME}/physica/physica_macros/PHYSICA.INIT
setenv PHYSICA_DIR  ${HOME}/packages/physica


export PATH=${PATH}:${EPICS_PATH}:${CAMP_DIR}:${HOME}/bin


# CVS
export CAMP_HELP=$CAMP_DIR
alias cvsmidas 'cvs -d pierre@midas.psi.ch:/usr/local/cvsroot \!*'
export CAMP_HOST=bnmrvw.triumf.ca
setenv CVSROOT midas@dasdevpc:/usr/local/cvsroot
alias camp_cmd=$CAMP_DIR/camp_cmd
setenv CVS_RSH ssh
alias camp=$CAMP_DIR/camp_cui
setenv EDITOR "emacs -nw"
alias emacs  "emacs -fn 10x20"
alias cvs_suz 'cvs -d "suz@dasdevpc:/usr/local/cvsroot"'
.........................


alias msr2txt "/home/bnmr/bin/msr2txt"
alias python3='python3.6'
setenv LANG C  # for man page
alias pip='pip3.6'
alias bfit='python3.6 -m bfit'
alias bccd='python3.6 -m bccd'
export BNMR_ARCHIVE=/isdaq/data1/bnmr/dlog/
export BNQR_ARCHIVE=/isdaq/data1/bnqr/dlog/
</pre>
</pre>
== File .login ==
== File .login ==

Latest revision as of 14:14, 27 April 2022

Introduction

This page describes the experimental setup of the bnmr and bnqr experiments, which are based on the MIDAS DAQ system.

MIDAS Host

The MIDAS Host for the bnmr and bnqr experiments is currently isdaq01, located in the ISAC1 counting room. Another desktop (isdaq06) is located nearby. isdaq06 is normally used as a terminal by the bnmr and bnqr experimenters, but also serves as the secondary MIDAS Host, in case of failure of isdaq01 (see #Changing the Midas host).

NIS ISAC Cluster

Both these desktops run NIS and are part of the ISAC cluster. The "master" computer is isdaq00 (located in the Computing Services server room). isdaq00 is the main file server and hosts the home directories for the cluster. The VMIC CPUs (lxbnqr,lxbnmr) and the CAMP VxWorks CPUs (bnmrvw,polvw) also mount home directories served by isdaq00. These machines (isdaq00, isdaq01, isdaq06) are on UPS.

Note
Unless isdaq00 is up and running, and the network is working, it will be impossible to run the experiments.

Experimental setup

Two accounts with usernames bnmr and bnqr have been set up to run the bnmr and bnqr experiments. These accounts run the bash shell, and the files /home/<beamline>/.bashrc contain the required setup for the experiments (see #File .bahrc). The ~/.login file (executed when logging in interactively) contains required EPICS fonts (see #File .login). Users may add more definitions to these files, but should not change any of the DAQ definitions or their experiments may fail to run properly.

Physica

Scripts to run physica are in directory /home/<beamline>/bin This directory also contains links to run bnmrfit, campvarlog and lcrplot. This directory is included in the PATH (hence no alias is defined). A local copy of the physica package is used (NOT the one in /triumfcs/linux/physica , which does not work for SL6).

Environment variables required for physica defined in .bashrc are shown in Table 3 below.

Environment Variables

There are a number of important Environment variables that must be correctly defined for the DAQ to run successfully. These are defined in .bashrc. This file is executed at login.

Some of the environment variables needed for data acquisition are:

  • DAQ setup (Table 1)
  • MIDAS setup (Table 2)
  • EPICS setup (Table 3)
  • Physica (Table 4)
Table 1 Defined Environment Variables (DAQ)
Name Purpose Value for expt:
bnmr bnqr
DAQ_HOST defines the name of the MIDAS Host isdaq01
BEAMLINE defines the beamline bnmr bnqr
VMIC_HOST defines the name of the MIDAS Frontend host (VMIC) lxbnmr lxbnqr
MUSR_DIR defines the path of MUSR libraries and required software /home/musrdaq/musr
CAMP_HOST name of CAMP host (mvme162) running VxWorks bnmrvw polvw
MSERVER_PORT defines the port to be used by environment variable MIDAS_SERVER_HOST 1176 1177


The MIDAS Environment variables required are shown in Table 2.

Table 2 Defined Environment Variables (MIDAS)
Name Purpose Value for expt:
bnmr bnqr
MIDASSYS Path of local copy of the MIDAS software package /home/bnmr/packages/midas /home/bnqr/packages/midas
MIDAS_EXPTAB Path of the experimental directory /home/bnmr/online/ /home/bnqr/online/
MIDAS_SERVER_HOST Must not be defined on MIDAS Host. Must be defined on VMIC isdaq01:1176 isdaq01:1177
MIDAS_EXPT_NAME MIDAS Experiment Name. Defined as BEAMLINE bnmr bnqr


Environment variables defined for EPICS are shown in Table 3 below:

Table 3 Defined Environment Variables for EPICS access
Name Purpose Value
EPICS_BASE path of EPICS package /home/midas/packages/epics-base
EPICS_HOST_ARCH host architecture linux-x86_64
EPICS_PATH path of EPICS utilities /home/midas/packages/epics-base/bin/linux-x86_64
EPICS_CA_AUTO_ADDR_LIST YES
EPICS_CA_ADDR_LIST 142.90.133.255
EPICS_CA_REPEATER_PORT 9003
EPICS_CA_SERVER_PORT 9004
EPICS_CA_AUTO_LIST NO
EPICS_CA_ADDR_PORT 142.90.130.27


Environment variables defined for #Physica are shown in Table 4 below:

Table 3 Defined Environment Variables for PHYSICA
Name Purpose Value
TRIUMF_TERMINAL_TYPE TRIUMF default terminal type x
TRIUMF_PLOTTER_TYPE TRIUMF default plotter hp
TRIUMF_FONTS TRIUMF default fonts ${HOME}/physica/fonts
PHYSICA_INIT Initialization file ${HOME}/physica/physica_macros/PHYSICA.INIT
PHYSICA_DIR Path of physica package ${HOME}/packages/physica

Changing the Midas host

The MIDAS host is defined by the environment variable DAQ_HOST in the ~/.cshrc file. Only isdaq01 or alternatively isdaq06 can be the midas host, and successfully run the experiment, because these hosts have the required permission to write to the required EPICS variables. If isdaq01 fails, change the environment variable DAQ_HOST to isdaq06 and also remove or edit /home/<beamline>/vmic_online/$BEAMLINE/.SHM_HOST.TXT .

Aliases

A number of useful aliases that run various scripts or start programs are defined in .bashrc, e.g.

  • start-all runs a script to start missing MIDAS clients
  • kill-all runs a script to kill all MIDAS clients
  • show-windows runs a script to show the client windows for clients frontend, mdarc and mheader
  • camp runs the CAMP user interface

File .bashrc

The parts of the ~/.bashrc file relevent to DAQ is shown below:

# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

export PS1='(bash) [\u@\h \W]\$ '

alias tnt2k1='rdesktop -f tnt2k.triumf.ca'
alias mycommd='sh cmds'
alias phys='/home/bnmr/packages/physica/physica &'

#Passwordless access for bnmrpc
alias gobnmrpc='vncviewer bnmrpc -passwd ~/.vnc/passwd'

unset SHELL
export HOST=`hostname`
export MIDAS_EXPT_NAME=bnmr
export MIDAS_EXPTAB=/home/bnmr/online/exptab
export DAQ_HOST=isdaq01
export VMIC_HOST=lxbnmr

export MIDASSYS=$HOME/cycling_dev/packages/midas_oct2020
export EPICS_BASE=/home/midas/packages/epics-base
export MUSR_DIR=/home/musrdaq/musr

# For python3
export PATH=$PATH:$HOME/.local/bin
export PYTHONPATH=$PYTHONPATH:~/cycling_dev/packages/benmr

alias autoruns=/home/bnmr/cycling_dev/packages/mui/autoruns.tcl
alias campvarlog=/home/bnmr/cycling_dev/packages/mui/bnmr_logger.tcl

alias muddiff="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/diff_mud_files.py"
alias muddump="python3.6 ~/cycling_dev/packages/benmr/bnxr_common/tests/dump_mud_file.py"

triumf=".triumf.ca"
export daq_host=$DAQ_HOST$triumf
export vmic_host=$VMIC_HOST$triumf

unset MIDAS_LINUX

if [ $HOST == $VMIC_HOST ] || [ $HOST == $vmic_host ]; then
  # lxbnmr - talk to isdaq01 through mserver
  #export MIDAS_SERVER_HOST=$DAQ_HOST":7072"
  export MIDAS_SERVER_HOST=$DAQ_HOST":1195"
  export PATH=$MIDASSYS/linux-m32/bin:/triumfcs/linux/bin:/home/bnmr/cycling_dev/packages/benmr/bin:$PATH
  export EPICS_HOST_ARCH=linux-x86
  export CAMP_DIR=$MUSR_DIR/camp/linux-m32
  export EPICS_CA_AUTO_ADDR_LIST=YES
  export EPICS_CA_ADDR_LIST=142.90.133.255
  export EPICS_CA_REPEATER_PORT=9003
  export EPICS_CA_SERVER_PORT=9004
  export EPICS_CA_AUTO_LIST=NO
  export EPICS_CA_ADDR_PORT=142.90.130.27
#  export EPICS_CA_AUTO_ADDR_LIST=NO
#  export EPICS_CA_ADDR_LIST=142.90.132.202
#  export EPICS_CA_REPEATER_PORT=9093
#  export EPICS_CA_SERVER_PORT=9094
fi

if [ $HOST == $DAQ_HOST ] || [ $HOST == $daq_host ]; then
  # isdaq01 - main host
  source scl_source enable devtoolset-8
  source scl_source enable rh-python36
  export PYTHONPATH=$MIDASSYS/python:$DAQ_DIR:$PYTHONPATH
  export PATH=$MIDASSYS/bin:/home/bnmr/cycling_dev/packages/midas_tcl:/home/bnmr/cycling_dev/packages/benmr/bin:/home/bnmr/cycling_dev/packages/lcrp64:$PATH
  unset MIDAS_SERVER_HOST
  export EPICS_HOST_ARCH=linux-x86_64
  export CAMP_DIR=$MUSR_DIR/camp/linux
  export EPICS_CA_AUTO_ADDR_LIST=NO
  export EPICS_CA_ADDR_LIST=142.90.132.202
  export EPICS_CA_REPEATER_PORT=9093
  export EPICS_CA_SERVER_PORT=9094
fi

export EPICS_PATH=$EPICS_BASE/bin/$EPICS_HOST_ARCH
export LD_LIBRARY_PATH=${EPICS_BASE}/lib/$EPICS_HOST_ARCH
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/musrdaq/lib

export PATH=${PATH}:${EPICS_PATH}:${CAMP_DIR}:${HOME}/bin

export CAMP_HELP=$CAMP_DIR
export CAMP_HOST=bnmrvw.triumf.ca
alias camp_cmd=$CAMP_DIR/camp_cmd
alias camp=$CAMP_DIR/camp_cui

alias python3='python3.6'
alias pip='pip3.6'
alias bfit='python3.6 -m bfit'
alias bccd='python3.6 -m bccd'
export BNMR_ARCHIVE=/isdaq/data1/bnmr/dlog/
export BNQR_ARCHIVE=/isdaq/data1/bnqr/dlog/

File .login

The file ~/.login is shown below"

# The commands in this file are executed when a csh user first
# logs in.  This file is processed after .cshrc.
#
# $Revision: 1.6 $
#
# EPICS fonts...  put xset in .login rather than .cshrc
if ( "$?DISPLAY" ) then
  if ( "$DISPLAY" =~ "*:0.*" ) then
    if ( `xset -q` =~ "*/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/75dpi/*" ) then
      #echo "Bitmap font paths already set"
    else
      #echo "Set bitmap font paths for display $DISPLAY"
      xset +fp /usr/share/X11/fonts/100dpi/
      xset +fp /usr/share/X11/fonts/75dpi/
    endif
  else
    #echo "Display is not the console"
  endif
else
  #echo "There is no display"
endif