Page History
...
ts_config_V2:
config[group][0][rate]=10Hz
[1][rate]=100Hz
[2][rate]=100Hz
[4][rate]=100HzHiding
Rename/
...
Remove Old Configdb Objects
ability remove and hide (in the control gui) detector configurations that aren't needed anymore
(hide: prepend an "_"?, rename timing_1 to _timing_1?)
rename = delete+create
...
Code Block | ||
---|---|---|
| ||
c2 = cdb.configdb(mdb.server, "SXR", create=True, root=dbname) c2.add_alias("FOO") # 0 c2.transfer_config("AMO", "BEAM", "evr0", "FOO", "evr3") # 1 with pytest.raises(Exception): c2.transfer_config("AMO", "BEAM", "evr0", "FOO", "evr3") print("Configs:") c2.print_configs() cfg1 = c.get_configuration("BEAM", "evr0") cfg2 = c2.get_configuration("FOO", "evr3") # These should be the same except for the detector names! del cfg1['detName:RO'] del cfg2['detName:RO'] assert cfg1 == cfg2 c2.rename_device("evr3", "evr7", "FOO") cfg3 = c2.get_configuration("FOO", "evr7") # These should be the same except for the detector names! del cfg3['detName:RO'] assert cfg2 == cfg3 with pytest.raises(ValueError): c2.remove_device("evr6", "FOO") c2.remove_device("evr7", "FOO") with pytest.raises(ValueError): cfg4 = c2.get_configuration("FOO", "evr7") |
Rename/Remove Discussion
with Chris Ford, Murali, Matt, cpo on April 17, 2024
Murali highlighted some important questions with the new rename/remove features. Here they are, with answers from the group. I believe the conclusions were unanimous:
- do we want to update all old keys or only the latest key?
- the consensus was that updating only the latest key did a better job of preserving the history (e.g. for comparison with xtc values). there was a weak counter-argument that the "configdb rollback" command would not work as naturally (would need to know both the old name and the new name).
- the detector name (e.g. trigger_0) shows up twice: once as a database-lookup key ("device") and once in the document with typed-json ("detName:RO", which is useful for converting to xtc). Do we want to edit both?
- Yes, it is more natural to edit both. Matt pointed out that the daq code may overwrite detName:RO, but we weren't certain, and in any event it feels more elegant to have it be correct in the database
- do we want to create a new key with the changes?
- Yes, because this does a better job of preserving the history
- do we want to create a new document with the new detName:RO?
- Yes, because this does a better job of preserving the history
Overview
Content Tools