DPL: improve ability to forward messages to an output#4609
DPL: improve ability to forward messages to an output#4609ktf merged 1 commit intoAliceO2Group:devfrom
Conversation
ktf
commented
Oct 15, 2020
- Old dangling-outputs-policy renamed to forwarding-destination.
- Introduced "forwarding-policy" to decide which kind of messages to forward.
- Use enums rather than integers.
|
@ktf can you please rebase. It is not building for me. |
432e993 to
df6d68b
Compare
|
@ironMann sorry, this is the correct PR. I will close the other one, as per @preghenella comment, it's not actually required to have consumed data forwarded. |
|
@ktf With this I only get the following, even for |
|
Ok. I will check in a bit... |
df6d68b to
7cb746d
Compare
|
@ironMann I have finally properly reviewed this and my synthetic test works. I also tried the following: o2-dpl-raw-proxy --session default --forwarding-policy dangling --forwarding-destination fairmq --readout-proxy '--channel-config name=readout-proxy,type=pull,method=connect,address=ipc:///tmp/stfb-to-dpl,transport=shmem,rateLogging=1' --internal-dpl-injected-output-proxy '--channel-config name=downstream,type=push,method=bind,address=ipc:///tmp/dpl-to-stfs,rateLogging=1,transport=shmem' --severity debugand it seems to connect properly, however I do not have readout.exe setup correctly at the moment, so I cannot fully guarantee. If you can try it it would be great I will try to do it as well, but not immediately. Notice that the device has been renamed |
|
Full setup with TOF compressor. ninja stage/bin/o2-dpl-raw-proxy stage/bin/o2-testworkflows-simple-source stage/bin/o2-dpl-raw-proxy stage/bin/o2-tof-compressor stage/bin/o2-dpl-run
PROXY_SPEC="x:TOF/RAWDATA"
COMPR_CONF="x:TOF/RAWDATA"
VERBOSE=""
VERBOSE="--tof-compressor-verbose --tof-compressor-decoder-verbose"
stage/bin/o2-dpl-raw-proxy -b --session default \
--dataspec "$PROXY_SPEC" \
--channel-config "name=readout-proxy,type=pull,method=connect,address=ipc:///tmp/stf-builder-dpl-pipe-0,transport=shmem,rateLogging=1" |\
stage/bin/o2-tof-compressor -b --session default \
--tof-compressor-rdh-version 6 \
--tof-compressor-config "$COMPR_CONF" \
$VERBOSE --dump |\
stage/bin/o2-dpl-run \
--forwarding-policy dangling \
--forwarding-destination fairmq \
--internal-dpl-injected-output-proxy '--channel-config name=downstream,type=push,method=bind,address=ipc:///tmp/dpl-to-stfs,rateLogging=1,transport=shmem' \ |
@ktf If I understand you, this would setup an pass-through DPL workflow. I gave it a test with some TOF data, and again there is nothing on the output: |
|
Can you remind me your full setup? I am unable to run readout + stfbuilder. I do: # test config to run readout-stbf out of the box with data emulator
cat << EOF >readout.cfg
# dummy data source
[equipment-emulator-1]
enabled=1
name=emulator-1
equipmentType=cruEmulator
memoryPoolNumberOfPages=1800
memoryPoolPageSize=1M
numberOfLinks=4
PayloadSize=8000
# monitor counters
[consumer-stats]
consumerType=stats
monitoringEnabled=0
monitoringUpdatePeriod=5
monitoringURI=no-op://
# send data to stfb
[consumer-StfBuilder]
enabled = 1
consumerType = FairMQChannel
sessionName = default
fmq-transport = shmem
fmq-name = readout
fmq-type = push
fmq-address = ipc://@flp-readout-pipe-0
unmanagedMemorySize = 2G
memoryPoolNumberOfPages = 200
memoryPoolPageSize = 1M
disableSending=0
EOF
readout.exe file:readout.cfgand StfBuilder --id stfb --session default --transport shmem \
--detector TOF --detector-rdh 6 \
--dpl-channel-name dpl-chan \
--input-channel-name readout \
--output-channel-name dpl-chan \
--data-source-enable 1 --data-source-rate=44 \
--channel-config="name=readout,type=pull,method=connect,address=ipc://@flp-readout-pipe-0,transport=shmem,rateLogging=10" \
--channel-config="name=dpl-chan,type=push,method=bind,address=ipc://@stfb-to-dpl,transport=shmem,rateLogging=10"the two processes initialise, but then nothing else happens... |
7cb746d to
518d907
Compare
|
Ok, I managed to run it and get something out of STF builder. The options for the internal devices need to be specified in the correct place and in general the This is annoying, but at least can be worked around. I will open a JIRA ticket on finally reworking the whole thing. With the following: ninja stage/bin/o2-dpl-raw-proxy stage/bin/o2-testworkflows-simple-source stage/bin/o2-dpl-raw-proxy stage/bin/o2-tof-compressor stage/bin/o2-dpl-run
PROXY_SPEC="x:TOF/RAWDATA"
COMPR_CONF="x:TOF/RAWDATA"
VERBOSE=""
VERBOSE="--tof-compressor-verbose --tof-compressor-decoder-verbose"
fairmq-shmmonitor --cleanup
stage/bin/o2-dpl-raw-proxy -b --session default \
--dataspec "$PROXY_SPEC" \
--forwarding-policy dangling \
--forwarding-destination fairmq \
--severity debug \
--internal-dpl-injected-output-proxy '--channel-config="name=downstream,type=push,method=bind,address=ipc:///tmp/dpl-to-stfs,rateLogging=1,transport=shmem"' \
--readout-proxy '--channel-config "name=readout-proxy,type=pull,method=connect,address=ipc:///tmp/stfb-to-dpl,transport=shmem,rateLogging=1"' |\
stage/bin/o2-tof-compressor -b --session default \
--tof-compressor-rdh-version 6 \
--tof-compressor-config "$COMPR_CONF" \
--forwarding-policy dangling \
--severity debug \
--forwarding-destination fairmq \
$VERBOSEI am able to run stf-builder + DPL + stf-sender with the sender actually receiving something, before the compressor crashes (not sure why). There is a few issues:
|
|
Regarding the dropped messages, shouldn't you simply give --dataspec TOF/RAWDATA to it? |
|
This has nothing to do with TOF, or RAWDATA. One should simply not need to know the type or source of the individual O2 messages in the STF. Can the input proxy simply forward everything not matched to an DPL consumer to the output proxy? Eg, messages encoding end-of-stream also get blocked. |
