Skip to content

xAODEventFormatCnv: Copy EventFormat from input to output with identical key

The original implementation of the EventFormatMetaDataTool collected all EventFormat objects from the input and merged them into a single object. That single object was stored under the key specified in the "OutputKey" property of the tool.

The metadata service has some special handling for the EventFormatMetaDataTool. It creats a new tool for each EventFormat proxy added to the InputMetaDataStore. It would then set the OutputKey to be the same as the key of the object in the input.

This works fine in workflows. However, when writing multiple streams in with SharedWriter this created unnecessary entries in the output EventFormat object: specifically, all xAOD objects for all streams were added to the EventFormat of each stream.

For example, the MetaDataSvc copies (via shared memory) the "EventFormatStreamDAOD_PHYS" and "EventFormatStreamDAOD_PHYSLITE" from the worker MetaDataStore to the controller InputMetaDataStore for merging. For each it creates a EventFormatMetaDataTool, one with OutputKey set to "EventFormatStreamDAOD_PHYS" the other "EventFormatStreamDAOD_PHYSLITE". The tools would then merge the content of "EventFormatStreamDAOD_PHYS" and "EventFormatStreamDAOD_PHYSLITE" from the input into their object and safe it to the MetaDataStore under their output key.

This MR fixes this by adjusting the behavior of the EventFormatMetaDataTool: Each EventFormaty object in the InputMetaDataStore si copied (key by key), such that a copy of the object shows up in the MetaDataStore with the same key.

With this addition, setting up a MetaDataTool for each EventFormat proxy is obsolete. Setting the input and output keys in the EventFormatMetaDataTool also becomes obsolete. This has been noted in comments in the relevant places of the MetaDataSvc.

Tag: @gemmeren @amete @mnowak

Edited by Frank Berghaus

Merge request reports