Skip to content

Use predefined numbers in ExecutionReportsWriter

The ExecutionReportsWriter algorithm numbers each DecReport object with an incrementing counter starting from zero. This is problematic for two reasons:

  1. Zero is considered an invalid DecReport ID (although I don't know why, ideas @graven?)
  2. The IDs must be aligned with those set in the HltANNSvc so that the correct names can be associated to the reports on deserialisation. Because the reports writer is acting in 'isolation', we cannot syncronise the IDs in the configuration.

The reports writer should either query the ANN service to get the IDs, or we can configure the writer explicitly alongside the ANN service, e.g.

lines = []  # get all lines
selection_ids = {line.name: idx + 1 for idx, line in lines}
erw = ExecutionReportsWriter(
    # …
    SelectionIDs=selection_ids
)
hlt_ann_svc = setup_component(
    "HltANNSvc",
    # …
    Hlt1SelectionID=selection_ids
)

Although a part of me doesn't like 'coupling' things in the C++, I don't like syncing the IDs 'by hand' in Python more, so would probably query the ANN service in the reports writer.

/cc @nnolte @sstahl @rmatev

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information