Author:
- Bryan Moffit
- TJNAF Fast Electronics and Data Acquisition
A collection scripts for use with DAQs running CODA 3
If you’re not sharing this directory with the CODA Components (e.g. with NFS), repeat all of the steps for each component.
- With git
git clone git@github.com:JeffersonLab/coda_scripts.git ~/coda/coda_scripts
- From zip
unzip coda_scripts-master.zip ~/coda/
mv coda_scripts-master coda_scripts
The setup file depends on your CODA Component’s default shell
# if undefined, use /site
: ${CODA:=/site/coda/3.10_devel}
# CODA/.setup overwrites SESSION and EXPID, save them, or set the default values
SAVE_SESSION=${SESSION:-session}
SAVE_EXPID=${EXPID:-expid}
# Default COOL_HOME and JAVA_HOME
: ${COOL_HOME:=${HOME}/coda/cool}
: ${JAVA_HOME:=${HOME}/jdk1.8.0_152}
# Default REMEX variables
: ${REMEX_CMSG_HOST:=thishost.jlab.org}
: ${REMEX_CMSG_PASSWORD:=${EXPID}}
# Default CODA_COMPONENT_TABLE
: ${CODA_COMPONENT_TABLE:=${CODA_SCRIPTS}/config/${EXPID}/coda_component_table.cfg}
setenv CODA_SCRIPTS ${HOME}/coda/coda_scripts
setenv CODA /site/coda/3.10_devel
setenv SESSION session
setenv EXPID expid
setenv COOL_HOME ${HOME}/coda/cool
setenv JAVA_HOME ${HOME}/jdk1.8.0_152
setenv REMEX_CMSG_HOST thishost.jlab.org
setenv REMEX_CMSG_PASSWORD ${EXPID}
setenv CODA_COMPONENT_TABLE ${CODA_SCRIPTS}/config/${EXPID}/coda_component_table.cfg
export CODA_SCRIPTS=~/coda/coda_scripts
source $CODA_SCRIPTS/setupCODA3.bash
setenv CODA_SCRIPTS=~/coda/coda_scripts
source $CODA_SCRIPTS/setupCODA3.tcsh
Similar lines may need to be set in the corresponding .bash_profile
and / or .profile
. One way to accomplish this is to softlink them to your .bashrc
/ .tcshrc
- e.g. BASH
cd ${HOME}
ln -s .bashrc .bash_profile
The file defined by $CODA_COMPONENT_TABLE
specifies the components that will interact with these scripts
HOSTNAME COMPONENT_TYPE COMPONENT_NAME OPTIONAL_ARG
- I have a PEB named PEB1 running on daqpc1:
daqpc1 PEB PEB1
- I have a ROC named ROC2 running on daqroc2 and needs to run a tcl script to set it’s randy factor on startup:
daqroc2 ROC ROC2 -t setrf.tcl
- In
$CODA_SCRIPTS/platform.service
, modify theExecStart
to point to the script location andUser
to the daq user. e.g.
User=thisuser ExecStart=/home/thisuser/coda/coda_scripts/coda_platform.sh
- Modify the
$CODA_SCRIPTS/platform.sh
script for the location ofsetupCODA3.bash
. e.g.
source /home/thisuser/coda/coda_scripts/setupCODA3.bash
- Enable the platform service (as root).
systemctl enable /home/thisuser/coda/coda_scripts/platform.service
- Start the platform service
systemctl start platform
- Run
jcedit
- Create new COOL database
- Expert -> Session -> New
- Enter SESSION name (matches that defined in environment)
startCoda
restartStuff
kcoda