Difference between revisions of "SBS DAQ: GEM EEL Cleanroom setup"

From Hall A Wiki
Jump to: navigation, search
(Machines in use)
m (Moffit moved page SBS GEM EEL Cleanroom setup to SBS DAQ: GEM EEL Cleanroom setup: Making this DAQ specific)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== CODA scripts ==
 +
These scripts are located in
 +
<code>$HOME/bin/</code>
  
 +
=== Frontend scripts to use on hallavme12pc ===
 +
==== <code>startCoda</code> ====
 +
* executes each CODA component (platform, rcgui, PEB, all ROCs) in a separate xterm
 +
==== <code>restartStuff</code> ====
 +
* kills and restarts the PEB and ROCs.  The xterms are not killed with this script.
 +
==== <code>kcoda</code> ====
 +
* kills all CODA components
 +
 +
=== Backend scripts, called by the frontend scripts ===
 +
 +
'''<code>remote_vme</code>'''
 +
* script that restarts an ssh connection if it is closed. 
 +
'''<code>PEB_hallavme12pc</code>'''
 +
* script that launches '''coda_emu_peb'''.  restarts it when it is killed.
 +
'''<code>ROC_hallavme14pc</code>'''
 +
* script that uses '''remote_vme''' to launch '''SBS_startroc.sh''' on hallavme14pc
 +
'''<code>ROC_sbsvme25</code>'''
 +
* script that uses '''remote_vme''' to launch '''SBS_startroc.sh''' on sbsvme25
 +
'''<code>SBS_startroc.sh</code>'''
 +
* script on sbsvme25, hallavme14pc that launches '''coda_roc''' with a ROC name determined from it's hostname.
 +
'''<code>kill_remotes.sh</code>'''
 +
* kills off '''ROC_hallavme14pc''', '''ROC_sbsvme25''', and '''coda_roc''' on hallavme14pc and sbsvme25.
 +
 +
== Useful stand-alone programs ==
 +
=== <code>remex</code> ===
 +
<code>$CODA/Linux-i686/bin/remex <remexHost> <function call></code>
 +
* Execute a function call on the specified remote Host
 +
:- Run without arguments for usage
 +
 +
=== <code>tiLibTest</code> ===
 +
<code>SBS-GEM-Cleanroom/linuxvme/ti/test/tiLibTest <TI slot number></code>
 +
* Test triggering capabilities of the local TI.
 +
:- Puts the local TI in master mode (with no slaves).
 +
:- Accepts triggers either from Front Panel TSinputs or Internal Random Pulser
 +
 +
=== <code>i2c_test</code>===
 +
<code>SBS-GEM-Cleanroom/linuxvme/mpd/libsrc/test/i2c_test <mpd slot number></code>
 +
* Test the initialization and configuration of the APVs in the specified MPD.
 +
:- Does the same initialization that is done in <code>mpd_list.c:rocDownload()</code>
 +
:- Also attempts the readback of the APV registers with <code>mpdApvStatus(0xffff)</code>
 +
 +
=== <code>vme_display</code> ===
 +
<code>SBS-GEM-Cleanroom/linuxvme/bin/vme_display <VME Address> <read size in bytes></code>
 +
* Display the read value of specified size from the specified VME address.
 +
:- Run without arguments for usage
 +
 +
=== <code>vme_modmem</code> ===
 +
<code>SBS-GEM-Cleanroom/linuxvme/bin/vme_modmem <VME Address> <read/write size in bytes></code>
 +
* Modify the value of specified size of the specified VME address.
 +
:- Run without arguments for usage
 +
 +
=== <code>mpdApvDecode</code> ===
 +
<code>bryan/mpdApvDecode/mpdApvDecode -f <evio filename></code>
 +
* Decode the raw data from the MPDs/APVs
 +
:- Local compilation of [https://github.com/JeffersonLab/mpdApvDecode JeffersonLab/mpdApvDecode]
 +
:- Command-line options
 +
'''-m N'''          set max event number to ''N''
 +
'''-s N'''          skip events until ''N''
 +
'''-e'''            show only errors
 +
'''-f filename'''  set input to ''filename'' 
 +
'''-o filename'''  redirect all output to ''filename''
 +
'''-C filename'''  use ''filename'' instead of ''decode.cfg'' for configuration
 +
 +
== Extra packages installed ==
 +
* [https://www.java.com/en/download/linux_manual.jsp Java runtime environment (1.8.0_221)]
  
 
== Machines in use ==
 
== Machines in use ==
  
'''hallavme12pc'''DAQ Computer (RunControl, Event Recording)
+
==== atedf3 ====
 +
* NFS server, tftp server for VME Controllers
 +
:* CODA and hardware drivers in <code>/data/disk2/SBS/</code>
 +
 
 +
:* Read-only permissions for all machines in 36 subnet
 +
:* Read-Write permissions for '''hallavme12pc''','''sbsvme25'''
 +
 
 +
==== hallavme12pc ====
 +
* DAQ Computer (RunControl, Event Building)
 +
:* Mount <code>atedf3:/data/disk2/SBS</code> to <code>/mnt/SBS</code>
 +
::- Uses autofs.  <code>/etc/auto.SBS</code> should be included in a line in <code>/etc/auto.master</code>
 +
:'''Restart procedure if not mounted after reboot'''
 +
::Option 1: (preferred)
 +
:::- logout of coda
 +
:::- login as root
 +
::::<code>cp /etc/auto.master_SBS /etc/auto.master</code>
 +
::::<code>service puppet stop</code>
 +
::::<code>service autofs restart</code>
 +
:::- login normally as coda
 +
::Option 2:
 +
:::- logout of coda
 +
:::- login as root
 +
::::<code>mount atedf3:/data/disk2/SBS /mnt/SBS</code>
 +
:::- login normally as coda
 +
 
 +
:* Softlinks in <code>/home/coda/SBS-GEM-Cleanroom</code>
 +
 
 +
::* <code>coda/</code> CODA (3.10)
 +
 
 +
::* <code>linuxvme</code> (in CODA 3.10 directory)
 +
 
 +
::* <code>data</code> (filename format: gem_cleanroom_<run number>.evio.<split number>
 +
 
 +
==== hallavme14pc ====
 +
* XVB601 VME Controller
 +
::* 'daq' login
 +
::* Slots 2-8, 10-16: MPDs
 +
::* Slot 10: TI
 +
::* Softlinks in <code>/home/daq/SBS-GEM-Cleanroom</code>
 +
 
 +
==== sbsvme25 ====
 +
:* XVB601 VME Controller
 +
::* 'daq' login
 +
::* Slots 2-8, 10-16: MPDs
 +
::* Slot 21: TI
 +
::* Softlinks in <code>/home/daq/SBS-GEM-Cleanroom</code>
 +
 
 +
== Updated/Cloned New repos in coda/3.10/linuxvme ==
 +
 
 +
github links ([https://github.com/orgs/JeffersonLab/teams/coda-user team:coda-user]):
 +
* [https://github.com/JeffersonLab/jvme jvme]
 +
* [https://github.com/JeffersonLab/ti ti]
 +
* [https://github.com/JeffersonLab/ssp ssp]
 +
* [https://github.com/JeffersonLab/mpd mpd]
 +
 
 +
Added /site remote with (e.g. jvme, devel branch)
 +
  cd jvme
 +
  git remote add site /site/coda/contrib/devel/jvme
 +
  git pull site devel
 +
 
 +
== CODA environment setup script ==
 +
 
 +
Using BASH, source the environment setup script:
 +
 
 +
source ~/SBS-GEM-Cleanroom/env/setupCODA
 +
 
 +
== Stuff to finish ==
 +
 
 +
=== Replace hallavme12pc ===
 +
* Install OS
 +
* Use same mount scripts used on hallavme12pc
 +
* Use local storage for data.
 +
 
 +
===Add SSP crate===
 +
* Figure out it's hostname
 +
* Get it to boot just like the other ROCs
 +
* Check TI
 +
* Check SSP
 +
* Check MPD (for checking/debugging APVs)
 +
* Tell Ben we're ready to start connecting fiber from MPD to SSP
 +
 
 +
===Log CODA runs to [https://logbooks.jlab.org/book/superbigbite logbooks/superbigbite]===
 +
* check out code used by Hall A's CODA 2.x
 +
* from Alex:
 +
:- <code>epicsRunstart</code>
 +
:- <code>epicsRunEnd</code>
 +
:- <code>runstart.tcl</code>
 +
:- <code>runend.tcl</code>
  
'''hallavme14pc''':  XVB601 VME Controller
+
===Add scripts and GEM-cleanroom specific configuration files to a remote git repo===
* Slots 2-8: MPDs
+
:- <code>.bashrc</code>
* Slot 10: TI
+
:- <code>setupCODA</code>
 +
:- <code>~/bin/*</code>

Latest revision as of 08:10, 25 September 2019

CODA scripts

These scripts are located in $HOME/bin/

Frontend scripts to use on hallavme12pc

startCoda

  • executes each CODA component (platform, rcgui, PEB, all ROCs) in a separate xterm

restartStuff

  • kills and restarts the PEB and ROCs. The xterms are not killed with this script.

kcoda

  • kills all CODA components

Backend scripts, called by the frontend scripts

remote_vme

  • script that restarts an ssh connection if it is closed.

PEB_hallavme12pc

  • script that launches coda_emu_peb. restarts it when it is killed.

ROC_hallavme14pc

  • script that uses remote_vme to launch SBS_startroc.sh on hallavme14pc

ROC_sbsvme25

  • script that uses remote_vme to launch SBS_startroc.sh on sbsvme25

SBS_startroc.sh

  • script on sbsvme25, hallavme14pc that launches coda_roc with a ROC name determined from it's hostname.

kill_remotes.sh

  • kills off ROC_hallavme14pc, ROC_sbsvme25, and coda_roc on hallavme14pc and sbsvme25.

Useful stand-alone programs

remex

$CODA/Linux-i686/bin/remex <remexHost> <function call>

  • Execute a function call on the specified remote Host
- Run without arguments for usage

tiLibTest

SBS-GEM-Cleanroom/linuxvme/ti/test/tiLibTest <TI slot number>

  • Test triggering capabilities of the local TI.
- Puts the local TI in master mode (with no slaves).
- Accepts triggers either from Front Panel TSinputs or Internal Random Pulser

i2c_test

SBS-GEM-Cleanroom/linuxvme/mpd/libsrc/test/i2c_test <mpd slot number>

  • Test the initialization and configuration of the APVs in the specified MPD.
- Does the same initialization that is done in mpd_list.c:rocDownload()
- Also attempts the readback of the APV registers with mpdApvStatus(0xffff)

vme_display

SBS-GEM-Cleanroom/linuxvme/bin/vme_display <VME Address> <read size in bytes>

  • Display the read value of specified size from the specified VME address.
- Run without arguments for usage

vme_modmem

SBS-GEM-Cleanroom/linuxvme/bin/vme_modmem <VME Address> <read/write size in bytes>

  • Modify the value of specified size of the specified VME address.
- Run without arguments for usage

mpdApvDecode

bryan/mpdApvDecode/mpdApvDecode -f <evio filename>

  • Decode the raw data from the MPDs/APVs
- Local compilation of JeffersonLab/mpdApvDecode
- Command-line options
-m N          set max event number to N
-s N          skip events until N
-e            show only errors
-f filename   set input to filename  
-o filename   redirect all output to filename
-C filename   use filename instead of decode.cfg for configuration

Extra packages installed

Machines in use

atedf3

  • NFS server, tftp server for VME Controllers
  • CODA and hardware drivers in /data/disk2/SBS/
  • Read-only permissions for all machines in 36 subnet
  • Read-Write permissions for hallavme12pc,sbsvme25

hallavme12pc

  • DAQ Computer (RunControl, Event Building)
  • Mount atedf3:/data/disk2/SBS to /mnt/SBS
- Uses autofs. /etc/auto.SBS should be included in a line in /etc/auto.master
Restart procedure if not mounted after reboot
Option 1: (preferred)
- logout of coda
- login as root
cp /etc/auto.master_SBS /etc/auto.master
service puppet stop
service autofs restart
- login normally as coda
Option 2:
- logout of coda
- login as root
mount atedf3:/data/disk2/SBS /mnt/SBS
- login normally as coda
  • Softlinks in /home/coda/SBS-GEM-Cleanroom
  • coda/ CODA (3.10)
  • linuxvme (in CODA 3.10 directory)
  • data (filename format: gem_cleanroom_<run number>.evio.<split number>

hallavme14pc

  • XVB601 VME Controller
  • 'daq' login
  • Slots 2-8, 10-16: MPDs
  • Slot 10: TI
  • Softlinks in /home/daq/SBS-GEM-Cleanroom

sbsvme25

  • XVB601 VME Controller
  • 'daq' login
  • Slots 2-8, 10-16: MPDs
  • Slot 21: TI
  • Softlinks in /home/daq/SBS-GEM-Cleanroom

Updated/Cloned New repos in coda/3.10/linuxvme

github links (team:coda-user):

Added /site remote with (e.g. jvme, devel branch)

 cd jvme
 git remote add site /site/coda/contrib/devel/jvme
 git pull site devel

CODA environment setup script

Using BASH, source the environment setup script:

source ~/SBS-GEM-Cleanroom/env/setupCODA

Stuff to finish

Replace hallavme12pc

  • Install OS
  • Use same mount scripts used on hallavme12pc
  • Use local storage for data.

Add SSP crate

  • Figure out it's hostname
  • Get it to boot just like the other ROCs
  • Check TI
  • Check SSP
  • Check MPD (for checking/debugging APVs)
  • Tell Ben we're ready to start connecting fiber from MPD to SSP

Log CODA runs to logbooks/superbigbite

  • check out code used by Hall A's CODA 2.x
  • from Alex:
- epicsRunstart
- epicsRunEnd
- runstart.tcl
- runend.tcl

Add scripts and GEM-cleanroom specific configuration files to a remote git repo

- .bashrc
- setupCODA
- ~/bin/*