Skip to content

Commit 1fa76f9

Browse files
committed
config: switch to push/pull connection, add dpl example chain
1 parent c1cb850 commit 1fa76f9

File tree

3 files changed

+34
-77
lines changed

3 files changed

+34
-77
lines changed

script/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,27 @@ To use `readout.exe` as the CRU emulator:
1818
- Use `--data-source-dir` parameter to select the directory with (Sub)TimeFrame files previously recorded with StfBuilder or TfBuilder.
1919
- Use `--dpl-channel` parameter to select name of the DPL channel, defined [here](datadist_standalone_chain.json#L47-L58), e.g. `--dpl-channel dpl-stf-channel`
2020

21+
2122
FMQDevice channel configuration is in `script/rdatadist_standalone_chain.json`.
2223
If using CRU emulation mode of the `readout.exe` process, configuration of the emulator is read from `readout_cfg/readout_emu.cfg`.
2324

2425
`StfBuilder` component is used to read and inject previously recorded SubTimeFrames or TimeFrames (same file and data structure).
26+
27+
28+
### Example: running the chain with emulated data
29+
30+
```
31+
# adapt the configuration file path!
32+
33+
readout.exe file:///$HOME/alice/sw/slc7_x86-64/DataDistribution/latest/config/readout_emu.cfg
34+
```
35+
36+
```
37+
StfBuilder --id stf_builder-0 --transport shmem --detector TPC --dpl-channel-name=dpl-chan --channel-config "name=dpl-chan,type=push,method=bind,address=ipc:///tmp/stf-builder-dpl-pipe-0,transport=shmem,rateLogging=1" --channel-config "name=readout,type=pull,method=connect,address=ipc:///tmp/readout-pipe-0,transport=shmem,rateLogging=1"
38+
```
39+
40+
```
41+
o2-dpl-raw-proxy -b --dataspec "B:TPC/RAWDATA" --channel-config "name=readout-proxy,type=pull,method=connect,address=ipc:///tmp/stf-builder-dpl-pipe-0,transport=shmem,rateLogging=1" | o2-dpl-raw-parser -b --input-spec "B:TPC/RAWDATA"
42+
```
43+
44+
Make sure that only a single instance of the proxy is started.

script/datadist_standalone_chain.json

Lines changed: 12 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"transport": "shmem",
1010
"sockets": [
1111
{
12-
"type": "pair",
12+
"type": "push",
1313
"method": "bind",
1414
"address": "ipc:///tmp/readout-pipe-0"
1515
}
@@ -25,7 +25,7 @@
2525
"transport": "shmem",
2626
"sockets": [
2727
{
28-
"type": "pair",
28+
"type": "pull",
2929
"method": "connect",
3030
"address": "ipc:///tmp/readout-pipe-0",
3131
"rateLogging": "1"
@@ -49,8 +49,8 @@
4949
"transport": "shmem",
5050
"sockets": [
5151
{
52-
"type": "pair",
53-
"method": "connect",
52+
"type": "push",
53+
"method": "bind",
5454
"address": "ipc:///tmp/stf-builder-dpl-pipe-0",
5555
"rateLogging": "1"
5656
}
@@ -71,27 +71,6 @@
7171
"address": "ipc:///tmp/stf-builder-pipe-0"
7272
}
7373
]
74-
},
75-
{
76-
"name": "sender-stf-channel",
77-
"transport": "zeromq",
78-
"sockets": [
79-
{
80-
"type": "pair",
81-
"method": "bind",
82-
"address": "tcp://*:23000"
83-
},
84-
{
85-
"type": "pair",
86-
"method": "bind",
87-
"address": "tcp://*:23001"
88-
},
89-
{
90-
"type": "pair",
91-
"method": "bind",
92-
"address": "tcp://*:23002"
93-
}
94-
]
9574
}
9675
]
9776
},
@@ -104,7 +83,7 @@
10483
"transport": "shmem",
10584
"sockets": [
10685
{
107-
"type": "pair",
86+
"type": "push",
10887
"method": "bind",
10988
"address": "ipc:///tmp/readout-pipe-1"
11089
}
@@ -120,7 +99,7 @@
12099
"transport": "shmem",
121100
"sockets": [
122101
{
123-
"type": "pair",
102+
"type": "pull",
124103
"method": "connect",
125104
"address": "ipc:///tmp/readout-pipe-1"
126105
}
@@ -142,8 +121,8 @@
142121
"transport": "shmem",
143122
"sockets": [
144123
{
145-
"type": "pair",
146-
"method": "connect",
124+
"type": "push",
125+
"method": "bind",
147126
"address": "ipc:///tmp/stf-builder-dpl-pipe-1"
148127
}
149128
]
@@ -163,27 +142,6 @@
163142
"address": "ipc:///tmp/stf-builder-pipe-1"
164143
}
165144
]
166-
},
167-
{
168-
"name": "sender-stf-channel",
169-
"transport": "zeromq",
170-
"sockets": [
171-
{
172-
"type": "pair",
173-
"method": "bind",
174-
"address": "tcp://*:24000"
175-
},
176-
{
177-
"type": "pair",
178-
"method": "bind",
179-
"address": "tcp://*:24001"
180-
},
181-
{
182-
"type": "pair",
183-
"method": "bind",
184-
"address": "tcp://*:24002"
185-
}
186-
]
187145
}
188146
]
189147
},
@@ -196,7 +154,7 @@
196154
"transport": "shmem",
197155
"sockets": [
198156
{
199-
"type": "pair",
157+
"type": "push",
200158
"method": "bind",
201159
"address": "ipc:///tmp/readout-pipe-2"
202160
}
@@ -212,7 +170,7 @@
212170
"transport": "shmem",
213171
"sockets": [
214172
{
215-
"type": "pair",
173+
"type": "pull",
216174
"method": "connect",
217175
"address": "ipc:///tmp/readout-pipe-2"
218176
}
@@ -234,8 +192,8 @@
234192
"transport": "shmem",
235193
"sockets": [
236194
{
237-
"type": "pair",
238-
"method": "connect",
195+
"type": "push",
196+
"method": "bind",
239197
"address": "ipc:///tmp/stf-builder-dpl-pipe-2"
240198
}
241199
]
@@ -255,27 +213,6 @@
255213
"address": "ipc:///tmp/stf-builder-pipe-2"
256214
}
257215
]
258-
},
259-
{
260-
"name": "sender-stf-channel",
261-
"transport": "zeromq",
262-
"sockets": [
263-
{
264-
"type": "pair",
265-
"method": "bind",
266-
"address": "tcp://*:25000"
267-
},
268-
{
269-
"type": "pair",
270-
"method": "bind",
271-
"address": "tcp://*:25001"
272-
},
273-
{
274-
"type": "pair",
275-
"method": "bind",
276-
"address": "tcp://*:25002"
277-
}
278-
]
279216
}
280217
]
281218
},

script/readout_cfg/readout_emu.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ decodingMode=readout
143143
# enabled=1
144144
# transportType=shmem
145145
# channelName=readout
146-
# channelType=pair
146+
# channelType=push
147147
# channelAddress=ipc:///tmp/readout-pipe-0
148148
# unmanagedMemorySize=2G
149149
# disableSending=0
@@ -160,7 +160,7 @@ consumerType=FairMQChannel
160160
sessionName=default
161161
fmq-name=readout-out
162162
fmq-transport=shmem
163-
fmq-type=pair
163+
fmq-type=push
164164
fmq-address=ipc:///tmp/readout-pipe-0
165165
unmanagedMemorySize=2G
166166
memoryPoolPageSize=128k

0 commit comments

Comments
 (0)