Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CODA Documentation

CODA wiki
CODA on Linux

...

CODA setup instructions

CODA 2.6.2

...

Every time you run

(Assumes setup as described further down on this page.)

Code Block

ppa-pc88427 \~$ cd pelle/daq/coda
ppa-pc88427 \~/pelle/daq/coda$ source coda_user_setup

Check the msql deamon is running. If not start with:

Code Block

ppa-pc88427 \~/pelle/daq/coda$ msqld&

First terminal:

Code Block

ppa-pc88427 \~/pelle/daq/coda$ rcplatform

See below for expected output. If it's the first time you should answer 'Y' to the questions.

Second terminal:

Code Block

ppa-pc88427 \~$ cd pelle/daq/coda
ppa-pc88427 \~/pelle/daq/coda$ source coda_user_setup
ppa-pc88427 \~/pelle/daq/coda$ codamaster

You should get a GUI with the different configurations available. Select "cool" and press OK.

Third terminal:

Code Block

ppa-pc88427 \~$ ./pelle/daq/coda/trackerRoc

See below for expected output. You should also see that the ROC1 being registered in the rcplatform terminal.

In CODA master:

No Format

* Config->Enable buttons
* Click Event Builder

This should open an xterm and you should see EB1 being connected in the logs.

No Format

* Click Run Control

In the RC GUI:

No Format

* Platform->Connect

First time running?

First time you will need to setup configuration

No Format

* Session-> new = pelletest (or what you named you session above)
* options-> coda2 database-> run types = cool

Answer yes to translate

No Format

* configurations->cool

This should enable and connect run control properly to the session.

No Format

Press Configure in codamaster

EB1 and ROC1 should be configured

No Format

Press download in coda master

EB1 and ROC1 should be downloaded

No Format

Press prestart in coda master

EB1 and ROC1 should be paused

No Format

Press Go

...

Example output

...

Code Block

ppa-pc88427 \~/pelle/daq/coda$ rcplatform

Example output expected:

No Format

>> \*\**\* cMsg server sucessfully started at Fri Mar 29 11:42:40 PDT 2013 **\*\* <<
\*************************************************\*
\*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Afecs-1.4 Platform&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *
\*************************************************\*
\- Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = hps_tracker
\- Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ppa-pc88427.slac.stanford.edu
\- TCP port&nbsp;&nbsp;&nbsp;&nbsp; = 45000
\- UDP port&nbsp;&nbsp;&nbsp;&nbsp; = 45000
\- RC UDP port&nbsp; = 45200
\- Start time&nbsp;&nbsp; = 2013/03/29 11:42:41
\- Database at&nbsp; = /home/tracker/pelle/daq/coda/2.6.2/../cool
\*************************************************\*
\*************************************************\*
\*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Afecs-1.4 Container&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *
\*************************************************\*
\- Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ppa-pc88427.slac.stanford.edu_admin
\- Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ppa-pc88427.slac.stanford.edu
\- Start time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2013/03/29 11:42:43
\- Connected to:
\- Platform Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = hps_tracker
\- Platform Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ppa-pc88427.slac.stanford.edu
\- Platform TCP port&nbsp;&nbsp;&nbsp;&nbsp; = 45000
\- Platform UDP port&nbsp;&nbsp;&nbsp;&nbsp; = 45000
\- Platform RC UDP port&nbsp; = 45200
\*************************************************\*
APlatform:Info Registration request from  ppa-pc88427.slac.stanford.edu_admin agent running at  ppa-pc88427.slac.stanford.edu. 11:42:43 03/29
Code Block

ppa-pc88427 \~$ ./pelle/daq/coda/trackerRoc

Expected output:

No Format

Setting up coda 2.6.2 from /home/tracker/pelle/daq/coda/2.6.2
AFECS Home set to /home/tracker/pelle/daq/coda/2.6.2/afecs
done.
MSQL DATABASE = hps_tracker
WARNING: Could not get uid and gid info from database
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number of args in the id entry of sessions is 1
CODA 2.6.2,Name : ROC1, Type ROC Id : 0
pelletest::ROC1> INFO: Starting up rcClient Thread...Running the cMsg RC client, "ROC1"
&nbsp; connecting to UDL, cMsg:rc://multicast/hps_tracker
Connect is completed\!
subscribing subject = ROC1 type = run/transition/\*
subscribing subject = ROC1 type = session/control/\*
subscribing subject = ROC1 type = coda/info/\*
Setup CODA 2.6.2 from scratch on Linux

Updated 3/29/13 - Per Hansson Adrian

Instructions below are for the loal setup at SLAC on the hps tracker cpu.

%%% Initial setup

Login to hps tracker computer

Code Block

$ ssh \-X tracker@ppa-pc88427
Code Block

Download CODA and unpack[https://coda.jlab.org/wiki/index.php/Downloads]
$ mkdir daq \| cd daq
$ mkdir coda \| cd coda
$ tar \-xzvf coda_2.6.2.tar.gz

Edit the coda setup user script (attached):

No Format

Change CODA to to point to your coda installation
Change EXPID to hps_tracker (will identify the coda setup from here on)
Change SESSION to pelletest (defines what configuration you want to use)

Execute the coda setup user script

Code Block

$ source coda_user_setup

You will now have access to start the mSQL database deamon

Code Block

$ msqld &

(first time it will complain that it cannot open files and dirs but it creates them afterwards)

Check that the deamon is running (process msqld should be running)

Setup database structure

Code Block

$ cedit
No Format

* File->New Database (enter same name as $EXPID) to make a DB for the experiment
* File->New->Config (enter name 'cool') which is the "Run Type" or "configuration"
* Create the ROC (one of the icons, try them):
name: ROC1
ethernet host: ppa-pc88427.slac.stanford.edu
id: 2
boot string: $CODA_BIN/coda_roc
readout list: /home/tracker/pelle/daq/coda/test_primary/test_primary.so userString
The readout list is the configuration that tells coda what this ROC is being readout (see later for details)
* Create the event builder (EB)
name: EB1
host: ppa-pc88427.slac.stanford.edu
id: 1
booting string: $CODA_BIN/coda_eb
incoming: CODA
outgoing: CODA
* Then connect the ROC and EB with an arrow (drag a line between them)
* File->Save and then close the cedit program

Code Block

$ dbedit
No Format

* choose localhost to find your database in the browser and go to the localhost tab
* choose hps_tracker database from drop down list
* choose Table cool and you should see the ROC and EB you created earlier
* Change EB1 outputs to 'coda'

* go to the 'session' table
* add new row:
    name: pelletest (should be same as your session in the user script)
    id: 10 (should be unique?)
    owner: tracker (should have writeable permissions)
    runNumber: 1 (not sure why)
* quit dbedit program

To clean the database you can remove the content of the cool/ directory.

Setup the ROC and EB executables to use custom binaries built to handle large data frames needed for the SVT (attached)

Code Block

$ cp coda_roc_rc3.5big 2.6.2/Linux/bin/
$ cp coda_eb_test 2.6.2/Linux/bin/
$ cd 2.6.2/Linux/bin/
$ ln \-s coda_roc_rc3.5big coda_roc_rc3
$ ln \-s coda_eb_test coda_eb_rc3

...

on hpstracker

RCE setup in group C

...