CODA: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
Boiarino (talk | contribs)
Line 6: Line 6:


Executed in the order opposite to 'Go' transition: TS ROC first, then all remaining ROCs, then EB.
Executed in the order opposite to 'Go' transition: TS ROC first, then all remaining ROCs, then EB.
First ROC receives 'End' command:


1. 'coda_roc::codaEnd()' called, it does following:
1. 'coda_roc::codaEnd()' called, it does following:
Line 19: Line 21:
* call codaUpdateStatus("downloaded"), set tcpState = rocp->state = DA_DOWNLOADED
* call codaUpdateStatus("downloaded"), set tcpState = rocp->state = DA_DOWNLOADED


3. In network thread, 'roc_network::net_thread()' loop send 'end' event to EB, see 'ifend' flag in it, break loop, sleep(1), cleanup big buffers, call 'roc_network::LINK_close' which calls  'shutdown(socket, 2)' and 'close(socket)' closing connection to EB
After coda_roc is finished, 'End' command issued to EB, it executes 'coda_eb::codaEnd()', doing following:
1. Checks EB state in database, it should be 'active' (if 'downloaded', do nothing)
2. Building thread(s) see End event, call 'CODA_decode_spec(&temp,desc1)' ...
3. Wait for building thread(s) to finish and cleanup building threads


3. In network thread, 'roc_network::net_thread()' loop send 'end' event to EB, see 'ifend' flag in it, break loop, sleep(1), cleanup big buffers, call 'roc_network::LINK_close' which calls  'shutdown(socket, 2)' and 'close(socket)' closing connection to EB
3.


== VME Controllers: Intel-based FANUC under RHEL OS ==
== VME Controllers: Intel-based FANUC under RHEL OS ==

Revision as of 14:08, 2 May 2019

CODA is DAQ software designed and supported by JLAB CODA group. This section contains some information related to the use of CODA in Hall B.


End transition

Executed in the order opposite to 'Go' transition: TS ROC first, then all remaining ROCs, then EB.

First ROC receives 'End' command:

1. 'coda_roc::codaEnd()' called, it does following:

  • call 'ROL1::__end()' routine; it disables triggers and calls 'blocksLeft = tiBReady()' until nothing left, or until timeout
  • call 'codaUpdateStatus("ending")', sets 'tcpState = rocp->state = DA_ENDING' and 'rocp->active = 2'

2. inside 'coda_roc::output_proc_network' loop: after exiting current loop iteration execute 'case DA_ENDING':

  • make sure the output buffer gets sent if there is any data in it
  • make sure we have the last event in the output buffer
  • call informEB(EV_END) to send 'End' event to EB
  • call codaUpdateStatus("downloaded"), set tcpState = rocp->state = DA_DOWNLOADED

3. In network thread, 'roc_network::net_thread()' loop send 'end' event to EB, see 'ifend' flag in it, break loop, sleep(1), cleanup big buffers, call 'roc_network::LINK_close' which calls 'shutdown(socket, 2)' and 'close(socket)' closing connection to EB


After coda_roc is finished, 'End' command issued to EB, it executes 'coda_eb::codaEnd()', doing following:

1. Checks EB state in database, it should be 'active' (if 'downloaded', do nothing)

2. Building thread(s) see End event, call 'CODA_decode_spec(&temp,desc1)' ...

3. Wait for building thread(s) to finish and cleanup building threads

3.

VME Controllers: Intel-based FANUC under RHEL OS

CODA group install RHEL OS into flash memory, so it boot after power recycle. Auto mount and some other stuff must be adjusted for clon cluster: