CODA 3 Installation Walk-through

Table of Contents


The following guide to CODA 3 contains the steps I took to install CODA 3.10 on my RHEL 7.9 PC. Here you will find basic information that will help you with environment setup, database configuration, and taking then decoding the data from a local ROC.

Download and Install

CODA 3.10

Download and install the latest CODA 3 tarball

  • Here, I made a directory ($HOME/coda) and extracted CODA 3.10 into it.
mkdir $HOME/coda
tar zxvf coda310_arm-2.tgz -C $HOME/coda

This extracts the CODA 3.10 into CODA=$HOME/coda/coda3.10_arm. This info will be added below.


Download and install this version of the jdk:

  • I installed this in HOME as well:
tar zxvf jdk-8u152-linux-x86.tar.gz -C $HOME

This extracts the jdk into JAVA_HOME=$HOME/jdk1.8.0_152. This info will be added below.

coda_scripts and CODA 3 environment

Follow the for coda_scripts installation. These instructions include steps for setting up the CODA 3 environment.

  • I cloned the git repo in my CODA directory
cd ${HOME}/coda
git clone
  • Since I use bash, I modified the coda_scripts/setupCODA.bash to read:
# Where I installed stuff
export JAVA_HOME=$HOME/jdk1.8.0_152
export CODA=$HOME/coda/3.10_arm
export CODA_CONFIG=$HOME/coda/coda_scripts

# Add config scripts to path

# CODA 3 environment defaults
source ${CODA_CONFIG}/coda3.10.setup_bash

# Override some defaults
export SESSION=testsession
export EXPID=testexpid

export COOL_HOME=${CODA}/cool


export CODA_COMPONENT_TABLE=${CODA_CONFIG}/config/${EXPID}/coda_component_table.cfg

Be sure and update CODA, JAVA_HOME, and CODA_CONFIG to the paths where you have installed them. You're free to change the SESSION and EXPID to your own naming scheme. Change the REMEX_CMSG_HOST to match the hostname of your machine.

  • Now this file is sourced in my $HOME/.bashrc:
source $HOME/coda/coda_scripts/setupCODA3.bash

Test Configuration using a Local ROC

Now I'll test my installation by running a ROC and PEB on the PC. It'll generate some data and I'll use some CODA 3 utilities to look at the resulting data file.

Setup coda component table

The CODA_COMPONENT_TABLE environment variable was created in setupCODA.bash. Now I'll make one that defines a ROC (named ROC1) and PEB (named PEB1) that will run on my PC (short hostname: dharma):

#  coda_scripts/config/testexpid/coda_component_table.cfg
# hostname   component type    component name
dharma  ROC  ROC1
dharma  PEB  PEB1

Setup test configuration with jcedit

Start jcedit

With the CODA 3 environment defined, we can now run CODA 3 utilities. In a fresh terminal I execute jcedit:


A pop-up window appears with:


I clicked on the Ok button and the pop-up disappears. This has created a directory structure with the COOL database at COOL_HOME

The COOL Database Editor with a blank canvas appears:


Create a new SESSION

At the top of the jcedit GUI, I selected from the pull-down menu: Expert -> Session -> New…

A pop-up window appeared, I entered in my SESSION=testsession, and clicked OK:


Create a new CODA configuration

Now ready to make the test configuration, I did a click-and-drag on the ROC icon from the component column on the left of the GUI. ROC1 then appeared in the canvas.

I did the same with the PEB icon, and OUT icon. The canvas now looked like:


Double-clicking on a component in the canvas allows you to set them up for this configuration. For ROC1 I configured a test readout list (/home/moffit/coda/3.10_arm/examples/rol/ in the ROL1 field:


The FILE1 component was configured to generate an output Type=File: (/home/moffit/coda/data/testconfig_%d.evio.%d)


With this configuration, the first %d will be replaced with the current run number and the second %d replaced with the current split number.

Now I linked ROC1 to PEB1 by selecting the Link Mode:


then click-and-drag from one to the other. A pop-up window will show some various options for this link. The defaults are fine, and I just clicked Ok. I did the same procedure for linking the PEB1 to the FILE1. Again, the link defaults were fine and I clicked Ok.

My canvas now looked like:


I then saved this configuration using the Pull-Down menu: File -> Save

A pop-up window appeared, I entered testconfig, and clicked OK:


All done. I closed the GUI with the Pull-Down menu: File -> Exit

Compile example readout list

In a terminal, I changed directories into $CODA/examples/rol and compiled the test readout list.

cd $CODA/examples/rol


In a terminal, now I ran:


Three xterms should appear with the Platform, PEB1, and ROC1. The RunControl GUI appeared shortly afterwards:


In the top of Run Control, I select: Configurations -> Coda Config, and select testconfig. The GUI should re-configure and now show ROC1 and PEB1 in a booted state.

Take a run

Click on Configure button. Then Download, Then Start.



Look at the data output


I opened up a fresh terminal, and ran the program:


This brings up the GUI that allows you to view the data for each event within a CODA 3 run. I navigated to find my data file by using the Pull-down menu: File -> Open Event File, then used the pop-up window to find the file for the run I just took:


I chose to view the data in hexidecimal. This is selected using the pull-down: View -> Hexidecimal. The first two events are the Prestart and Go CODA events. You can navigate to the first triggered event by using the next> button:



I opened up a fresh terminal, navigated to my data directory and ran the program:

cd ~/coda/data/
evio2xml -verbose -pause testconfig_1.evio.0

This produced some output into the terminal that has the EVIO data format converted to XML. I pressed <Enter> a couple times to advance to the first triggered event:

<!-- ===================== Buffer 3 contains 220 words (880 bytes) ===================== -->

   <!-- header words: 219, 0xff501001 -->
   <event format="evio" count="3" content="bank" data_type="0x10" tag="65360" padding="0" num="1" length="219" ndata="218">

      <!-- header words: 11, 0xff212001 -->
      <bank content="segment" data_type="0x20" tag="65313" padding="0" num="1" length="11" ndata="10">

         <!-- header word: 0x10a0004 -->
         <uint64 data_type="0xa" tag="1" padding="0" length="4" ndata="2">
            0x0000000000000001  0x0000000012345678

         <!-- header word: 0x1850001 -->
         <uint16 data_type="0x5" tag="1" padding="2" length="1" ndata="1">

         <!-- header word: 0x1010002 -->
         <uint32 data_type="0x1" tag="1" padding="0" length="2" ndata="2">
            0x12345678  0x00000000

      <!-- header words: 205, 0x11001 -->
      <bank content="bank" data_type="0x10" tag="1" padding="0" num="1" length="205" ndata="204">

         <!-- header words: 203, 0x10101 -->
         <uint32 data_type="0x1" tag="1" padding="0" num="1" length="203" ndata="202">
            0x110000da  0x00000000  0x01000000  0x02000000
            0x03000000  0x04000000  0x05000000  0x06000000
            0x07000000  0x08000000  0x09000000  0x0a000000
            0x0b000000  0x0c000000  0x0d000000  0x0e000000
            0x0f000000  0x10000000  0x11000000  0x12000000
            0x13000000  0x14000000  0x15000000  0x16000000
            0x17000000  0x18000000  0x19000000  0x1a000000
            0x1b000000  0x1c000000  0x1d000000  0x1e000000
            0x1f000000  0x20000000  0x21000000  0x22000000
            0x23000000  0x24000000  0x25000000  0x26000000
            0x27000000  0x28000000  0x29000000  0x2a000000
            0x2b000000  0x2c000000  0x2d000000  0x2e000000
            0x2f000000  0x30000000  0x31000000  0x32000000
            0x33000000  0x34000000  0x35000000  0x36000000
            0x37000000  0x38000000  0x39000000  0x3a000000
            0x3b000000  0x3c000000  0x3d000000  0x3e000000
            0x3f000000  0x40000000  0x41000000  0x42000000
            0x43000000  0x44000000  0x45000000  0x46000000
            0x47000000  0x48000000  0x49000000  0x4a000000
            0x4b000000  0x4c000000  0x4d000000  0x4e000000
            0x4f000000  0x50000000  0x51000000  0x52000000
            0x53000000  0x54000000  0x55000000  0x56000000
            0x57000000  0x58000000  0x59000000  0x5a000000
            0x5b000000  0x5c000000  0x5d000000  0x5e000000
            0x5f000000  0x60000000  0x61000000  0x62000000
            0x63000000  0x64000000  0x65000000  0x66000000
            0x67000000  0x68000000  0x69000000  0x6a000000
            0x6b000000  0x6c000000  0x6d000000  0x6e000000
            0x6f000000  0x70000000  0x71000000  0x72000000
            0x73000000  0x74000000  0x75000000  0x76000000
            0x77000000  0x78000000  0x79000000  0x7a000000
            0x7b000000  0x7c000000  0x7d000000  0x7e000000
            0x7f000000  0x80000000  0x81000000  0x82000000
            0x83000000  0x84000000  0x85000000  0x86000000
            0x87000000  0x88000000  0x89000000  0x8a000000
            0x8b000000  0x8c000000  0x8d000000  0x8e000000
            0x8f000000  0x90000000  0x91000000  0x92000000
            0x93000000  0x94000000  0x95000000  0x96000000
            0x97000000  0x98000000  0x99000000  0x9a000000
            0x9b000000  0x9c000000  0x9d000000  0x9e000000
            0x9f000000  0xa0000000  0xa1000000  0xa2000000
            0xa3000000  0xa4000000  0xa5000000  0xa6000000
            0xa7000000  0xa8000000  0xa9000000  0xaa000000
            0xab000000  0xac000000  0xad000000  0xae000000
            0xaf000000  0xb0000000  0xb1000000  0xb2000000
            0xb3000000  0xb4000000  0xb5000000  0xb6000000
            0xb7000000  0xb8000000  0xb9000000  0xba000000
            0xbb000000  0xbc000000  0xbd000000  0xbe000000
            0xbf000000  0xc0000000  0xc1000000  0xc2000000
            0xc3000000  0xc4000000  0xc5000000  0xc6000000
            0xc7000000  0xff0000da

   <!-- end buffer 3 -->

This program has a number of useful features, including:

  • save the output to file (-out outfilename),
  • skip to specific events (-skip skip_event),
  • pause after each event (-pause)


6nov2020: Updated coda 3 tarball name to current: coda3.10_arm-1.tgz


16nov2020: Updated coda 3 tarball name to current: coda3.10_arm-2.tgz

Author: Bryan Moffit


Created: 2020-11-16 Mon 03:55