Track how we use references in runkey for connectivity views
Let's track how we structure the runkeys in gitlab issues, and let's use this issue for references specifically.
Here is an example of the current SR1 configs (3 SS and 1 LS staves) in 1 runkey: (it is a 4MB json file) full_current_sr1_runkey_2024-04-29.json
The runkey contains 2 sub-nodes: type Felix
and Staves
. The Felix
subnodes represent the optical fibers in FELIX card, i.e. the GBT links/channels. They are connected to fibers on staves with the references, i.e. the UUIDs of the stave fiber nodes:
'children': [{'type': 'FELIX_DEVICE',
'payloads': [{'type': 'FID_CONTROLLER_ID',
'data': 0}],
'children': [{'type': 'GBT_RX',
'payloads': [{'type': 'GBT_LINK',
'data': 0}],
'children': [{'id': '12114845-b6d2-48af-b56d-2f6df3810cb8'}]},
{'type': 'GBT_RX', ...
...
I.e. under the Staves
you have:
{'type': 'GBT_RX_Fiber',
'payloads': [{'type': 'rx_fiber_type',
'data': 'rx_pri'}],
'children': [{'type': 'elink', ...}],
'id': '12114845-b6d2-48af-b56d-2f6df3810cb8'},
The same scheme is used for the connectivity within a stave side. I.e. how an HCC frontend is connected to the elinks:
{'type': 'GBT_RX_Fiber',
'payloads': [{'type': 'rx_fiber_type',
'data': 'rx_pri'}],
'children': [{'type': 'elink', ...},
...
{'type': 'elink',
'payloads': [{'type': 'elink_number',
'data': 26},
{'type': 'egroup',
'data': 6},
{'type': 'epath',
'data': 2}],
'children': [{'id': '9f40833c-d156-49ed-a899-a88cf376d903'}]}],
'id': '12114845-b6d2-48af-b56d-2f6df3810cb8'},
...
Here, the child of the node type=elink
is an HCC frontend with UUID 9f40833c-d156-49ed-a899-a88cf376d903
. You can find it under frontends:
{'type': 'HCC',
'id': '9f40833c-d156-49ed-a899-a88cf376d903',
'payloads': [{'type': 'itsdaq_number',
'data': 27},
{'type': 'module_number',
'data': 13},
{'type': 'hybrid_name',
'data': 'X'},
{'type': 'config',
'data': {'name': 'Stave2_PPB_hcc27',
'HCC': {'ID': 3,
'fuse_id': '40098a',
'regs': {'Delay1': '02400000',
'Delay2': '44444444',
'Delay3': '00000444',
...
'trims': [16,
16,
16,
16,
16,
16,
16,
16,
16,
16],
'Parameters': {}}}},
{'type': 'enable',
'data': 1},
{'type': 'locked',
'data': 1},
{'type': 'rx_elink',
'data': ('rx_pri',
26)},
{'type': 'tx_elink',
'data': 1}],
'children': []}]},
Just for convenience, type=HCC
node duplicates the elink numbers where it is connected on the stave: tx_elink=1
and rx_elimk=('rx_pri', 26)
. RX elink = its fiber (pri or sec), and the elink within the fiber.
So, in this scheme, the whole node is references with the UUID children = [{'id': <UUID>} ,..]
. Is this valid in configDB? I.e. is that how references work in configDB or no?