Skip to content

Update file metadata handling for MT

Frank Berghaus requested to merge berghaus/athena:file_metadata_mt into master

Update the creation and propagation of xAOD::FileMetaData for the threaded environment.

The design principle is taken from the the work done on xAOD::EventFormat and EventStreamInfo:

  • The xAODMaker::FileMetaDataTool is a MetaDataTool responsible for porpogating the object object from input to output
  • The xAODMaker::FileMetaDataCreatorTool is a StreamHelperTool that creates a new object from the stream information The old dual-use FileMetaDataTool was removed as it appears to be unused - waiting on confirmation from @akraszna.

If a FileMetaData object exists in the input propagated by the FileMetaDataTool is retained over a newly created object. Only the dataType and mcProcID are updated. This is judged appropriate as the mcProcID may change in specific EVNT to EVNT filtering workflows, and the dataType reflects the stream name (RDO, AOD, etc.).

Just as with EventFormat and EventStreamInfo we now schedule the creation of the FileMetaData for all output streams. Before it was only scheduled in derivation workflows. The long term thought is that the combination of EventFormat and EventStreamInfo could become a ROOT-readable replacement for EventStreamInfo.

As before the FileMetaData object collects non-event information from "/TagInfo" and "/Simulation/Parameters". Information previously collected from EventStreamInfo is now taken from xAOD::EventInfo and DataHeader to make FileMetaData independent from EventStreamInfo. Only the first piece of content encountered for each piece of information is kept. In our production workflows the expectation is that this information remains constant throughout a job.

Both tools use the IMetaDataSvc interface to store the FileMetaData in the MetaDataStore. That means the transient object resides in the MetaCont. This is done to support propagating and creating FileMetaData in event service. @mnowak please have a look whether the way this is done at the moment (on BeginInputFile) would work.

A test was added running a short job on a default test input file creating an output that is checked for the FileMetaData object.

Tag: @gemmeren @tsulaia

Edited by Frank Berghaus

Merge request reports