Skip to content

Draft: New adapter (F.EVENT_INFO) to store trigger/event-level with FunTuple

Abhijit Mathad requested to merge AM_eventinfo into master

The MR adds a new adapter F.EVENT_INFO that allows to store event-level and trigger information in FunTuple.

Motivation for this is that, FunTuple is a candidate-by-candidate based tupling algorithm and therefore only takes as input functors that act on the candidate. To store event-level information, base functors will have data dependency on objects not related to the candidate e.g. LHCb::ODIN, DecReports (TISTOS is a separate beast). This adapter solve the issue by adding a a fake candidate dependency on the event information. As a result the adapter takes a data dependent functor and outputs the result, completely ignoring the input candidate. Addresses the issue: #285 (closed).

The user code in FunTuple looks like:

#define event info

evt_vars = {
    "EVENTNUMBER": F.EVENT_INFO(F.EVENTNUMBER, ODIN=odin),
    "RUNNUMBER": F.EVENT_INFO(F.RUNNUMBER, ODIN=odin)
}

PS: The composition of functors was discussed in the issue (see comment), however on the python side the event info functors are themselves defined to be DataDepWrapper, which I think will have to be changed for composition to work. Additionally, I am not sure when the composition MR will be in. So have opted for an option that requires least changes to the current framework, with no additional dependencies.

To be tested with: Analysis!867 (merged) and DaVinci!654 (merged)

FYI: @graven , @sstahl , @pkoppenb , @erodrigu , @ldufour , @gligorov

Edited by Abhijit Mathad

Merge request reports