Skip to content

Reduce the number of `bind` statements needed: improved configuration (derivation) of SourceIDs

Gerhard Raven requested to merge less_configurable_less_bind into master

If a function 'f' calls a function 'g' where 'g' is a @configurable, remove any arguments from 'f' which are solely used to call 'g', if they are 'configurable' by binding 'g'.

This removes the need to (consistently!) bind both 'f' and 'g', and instead only requires 'g' to be bound. Basically, bind-able arguments which only exist to configure layers 'below' the current should not be there.

long version:

  • add dedicated python 'HltSourceID' enum, and add a single mapping of InputProcessTypes to HltSourceID. Use this 'HltSourceID' enum to verify the validity of arguments.
  • remove the stream and input process arguments from get_odin: there can be only one ODIN, and other than having to know from which RawEvent it must be created (which requires configuring default_raw_event, not configuring get_odin) there is nothing to be configured.
  • remove arguments from get_mc_track_info that are never used
  • remove arguments from default_raw_banks which are solely used to configure default_raw_event
  • remove arguments from dstdata_filter which are solely used to configure default_raw_banks which are then solely used to configure default_raw_event
  • add a (currently unused) source argument to dstdata_filter which should be used to select the sourceID of the DstData raw bank on which the filter is applied
  • remove arguments from upfront_decoder which are solely used to configure default_raw_banks which are then solely used to configure default_raw_event
  • remove arguments from get_odin
  • remove input_process and stream arguments from get_hlt_reports, and add a source argument to filter the provided RawBanks which are provided default_raw_banks, which uses an appropriately configured default_raw_event (i.e. only the latter depends on stream / input_process)
  • remove duplicate mention of input_process in options -- now it only appears once instead of twice...

Must be applied in conjunction with Moore!2276 (merged), Analysis!979 (merged) and DaVinci!898 (merged)

Edited by Gerhard Raven

Merge request reports