8def generate_hwmap(oksfile, n_streams, n_apps = 1, det_id = 3, app_host = "localhost",
9 eth_protocol = "udp", flx_mode = "fix_rate"):
12 "schema/confmodel/dunedaq.schema.xml",
13 "schema/appmodel/application.schema.xml",
14 "schema/appmodel/fdmodules.schema.xml",
15 "schema/appmodel/wiec.schema.xml",
19 db.create_db(oksfile, schemafiles)
21 group_name = os.path.basename(oksfile).removesuffix(
".data.xml")
27 for app
in range(n_apps):
28 print (f
"Generating {app=}")
29 for stream_no
in range(n_streams):
30 print (f
"Generating {stream_no=}")
38 if det_id
in [2, 8, 9]:
40 f
"geioId-{source_id}",
48 f
"geioId-{source_id}",
54 db.update_dal(geo_dal)
55 stream = dal.DetectorStream(
56 f
"stream-{source_id}",
61 streams.append(stream)
64 sender_dal = dal.FakeDataSender(
65 f
"sender-{source_id}",
68 db.update_dal(sender_dal)
69 senders.append(sender_dal)
72 source_id = source_id + 1
74 sender_set = dal.ResourceSetAND(f
"senders-{app}", contains=senders)
75 db.update_dal(sender_set)
77 print(f
"New nic adding nic with id nic-{app}")
78 nic_dal = dal.FakeDataReceiver(
81 db.update_dal(nic_dal)
82 detconn_dal = dal.DetectorToDaqConnection(
84 contains=[nic_dal, sender_set])
85 db.update_dal(detconn_dal)
86 groups.append(detconn_dal)