Skip to content

[master] Rework the data taking conditions

Christophe Haen requested to merge chaen/LHCbDIRAC:master_bkkConditions into master

At the moment, the Runs are registered in the bkk and the so called Data taking conditions are stored in a table (DATA_TAKING_CONDITIONS) which contains:

  • an ID
  • a description
  • a column per sub detector, with a value given from the online.

When a new run is registered, we check if there is as line in this table that matches the status of all sub detectors, and if so, return the description column.

If there is no such entry, we create a new line, and the description string was generated using the various Condition classes.

There are quite a few issues with this:

  • the description string is not unique. And when later we query the table using the description (when using the bkk path for example) only the last line is returned, which in practice means that there is a lot of dark data in the bkk
  • The values of the sub detector is actually never read, except when inserting a new run
  • With Run3, there are new sub detectors, and some are removed. So we would need to update the schema.

The proposition is as follow:

  • Do not store anymore the values of the sub-detectors
  • Simplify the condition string generation
  • Only lookup conditions based on string, and not on sub-detectors status anymore

The rest is unchanged, meaning that it should not break the existing. Also, this code path has never been used since the end of Run 2.

The new way the string is generated remains compatible with the existing. Technically, we could create a new stored procedure in oracle, but for now, I'd rather reuse the existing, until we are sure of the direction we are taking

BEGINRELEASENOTES

*Bookkeeping

CHANGE: Condition string generation simplified, and sub-detector status not stored in the DB anymore

ENDRELEASENOTES

Edited by Christophe Haen

Merge request reports