FairMQ/examples/readout
2021-11-03 20:23:40 +01:00
..
builder.cxx Apply modernize-use-equals-default 2021-05-28 13:14:51 +02:00
CMakeLists.txt reduce noise in examples 2021-05-13 23:00:35 +02:00
fairmq-start-ex-readout-processing.sh.in Add safety check in shmem region location 2019-10-29 20:06:31 +01:00
fairmq-start-ex-readout.sh.in Add safety check in shmem region location 2019-10-29 20:06:31 +01:00
processor.cxx Remove useless code 2021-05-28 13:14:51 +02:00
README.md Extend Readout example 2019-04-29 20:32:38 +02:00
readout.cxx Remove useless code 2021-05-28 13:14:51 +02:00
receiver.cxx Avoid accessing Device.fChannels directly, use getters 2021-11-03 20:23:40 +01:00
sender.cxx Remove useless code 2021-05-28 13:14:51 +02:00

Readout example

This examples shows two possible topologies (out of many) for a node connected to a detector readout (followed by a processing node).

Setup without new data generation

|------------------------------- Readout Node ---------------------------|     |- Processing Node -|
| Readout            -->            Builder          -->          Sender | --> |     Receiver      |
| [# shared memory segment (unused in this topology) ##################] | ofi |                   |
| [# shmem unmanaged region (readout writes here, others read) ########] |     |                   |
|------------------------------------------------------------------------|     |-------------------|

The devices one the Readout Node communicate via shared memory transport. Readout device writes into shared memory unmanaged region. The data is then forwarded through Builder to Sender process, which sends it out via OFI transport.

Setup with generating new data on the Readout node

|------------------------------- Readout Node ---------------------------|     |- Processing Node -|
| Readout     -->     Builder      -->      Processor     -->     Sender | --> |     Receiver      |
| [# shared memory segment (used between Proccessor and Sender) #######] | ofi |                   |
| [# shmem unmanaged region (readout writes here, builder & proc read) ] |     |                   |
|------------------------------------------------------------------------|     |-------------------|

In this topology one more device is added - Processor. It examines the arriving data and creates new data in shared memory. This data is not part of the unmanaged region, but lives in the general shared memory segment (unused in the previous setup). This new data is then forwarded to Sender and the Readout device is notified that the corresponding data piece in the unmanaged region is no longer used.