18) -> None:
19
20 schemafiles = [
21 "schema/confmodel/dunedaq.schema.xml",
22 "schema/appmodel/application.schema.xml",
23 "schema/appmodel/fdmodules.schema.xml",
24 "schema/appmodel/wiec.schema.xml",
25 ]
28 db.create_db(oksfile, schemafiles)
29
30 group_name = os.path.basename(oksfile).removesuffix(".data.xml")
31 groups = []
32 streams = []
33 senders = []
34 source_id = 0
35
36 for app in range(n_apps):
37 print (f"Generating {app=}")
38 print(f"New nic adding nic with id nic-{app}")
39 nic_dal = dal.NetworkInterface(f"nic-{app}")
40 db.update_dal(nic_dal)
41
42 for stream_no in range(n_streams):
43 print (f"Generating {stream_no=}")
44
45
46
47
48
49
50
51 if det_id in [2, 8, 9]:
52 geo_dal = dal.GeoId(
53 f"geioId-{source_id}",
54 detector_id=det_id,
55 crate_id=app+crate_id_offset,
56 slot_id=stream_no,
57 stream_id=1,
58 )
59 else:
60 geo_dal = dal.GeoId(
61 f"geioId-{source_id}",
62 detector_id=det_id,
63 crate_id=app+crate_id_offset,
64 slot_id=slot_id,
65 stream_id=stream_no,
66 )
67 db.update_dal(geo_dal)
68 stream = dal.DetectorStream(
69 f"stream-{source_id}",
70 source_id=source_id,
71 geo_id=geo_dal,
72 )
73 db.update_dal(stream)
74 streams.append(stream)
75 db.commit()
76
77 sender_dal = dal.FakeDataSender(
78 f"sender-{source_id}",
79 streams=[stream],
80 uses=nic_dal
81 )
82 db.update_dal(sender_dal)
83 senders.append(sender_dal)
84 db.commit()
85
86 source_id = source_id + 1
87
88 rec_dal = dal.FakeDataReceiver(
89 f"dataRec-{app}",
90 uses=nic_dal
91 )
92 db.update_dal(rec_dal)
93 detconn_dal = dal.NetworkDetectorToDaqConnection(
94 f"det-conn-{app}",
95 net_receiver=rec_dal,
96 net_senders=senders
97 )
98 db.update_dal(detconn_dal)
99 groups.append(detconn_dal)
100 senders = []
101
102 db.commit()
103
module(name, schema, other_dals=[], backend='oksconflibs', db=None)