Add a functional raw event merging algorithm
Currently, no functional algorithm to merge raw events into a new output raw event exists. The old version of an algorithm doing something similar is this one
The functionality is needed for example to add DecReports and SelReports to the raw event before writing it to an MDF file (currently done with a hack in Moore config). Another use case came up within standalone Allen processing. We would like to add MC information as raw banks to MDF files, such that only MDF files can be used as input for standalone Allen running, not also the custom binary format which is currently used to store the MC information.
One option is to create a MergingTransformer that merges raw events in the following way: It would take a vector of raw events as input and merge their content into one output raw event. If there is more than one version of the same raw bank type (from two different raw events), the merging would fail. Otherwise, all raw banks in all raw events are written to the new output raw event. One could pass a list of raw bank types which are certainly not supposed to be copied to speed up the loop over all raw bank types that is required for every raw event to check whether or not that particular raw bank exists.
Another option is a functional MDF writer which can take several raw events as input. @sstahl explored this approach in this closed MR
I plan to follow the approach of merging raw events into a new raw event to handle the Allen use case.