Skip to content

Serialize IOV metadata to ByteStream files for RDO to BS conversion

When converting MC RDO files to ByteStream format, IOV metadata (e.g., /Digitization/Parameters) is missing, causing issues for algorithms (e.g. LuminosityCondAlg) that need this data when processing ByteStream files.

This MR adds serialization of IOV metadata to ByteStream metadata:

IOVDbMetaDataTool:

  • Add serializeIOVMetadataToBSMetadata() to serialize configured IOV folders to JSON format
  • Store JSON strings in MetaDataStore as std::vector<std::string> named "IOVMetaDataStrings"
  • Format: IOVMeta.<FolderName>=<JSON> where JSON contains payloads with IOVs and attributes
  • Add property FoldersToSerializeToBSMetadata to configure which folders to serialize

LuminosityCondAlg and BunchCrossingCondAlg:

  • Add fallback to read digitization parameters from ByteStream metadata when folders unavailable
  • Try traditional /Digitization/Parameters folder first, fall back to ByteStream metadata
  • Parse JSON from freeMetaDataStrings to extract BeamIntensityPattern

ByteStreamEventStorageOutputSvc:

  • Read beam_type and beam_energy from TagInfo and store in ByteStream metadata
  • Retrieves IOV metadata strings from MetaDataStore
  • Adds them to freeMetaDataStrings

Configuration:

  • Configuration of IOVDbMetaDataTool to serialize /Digitization/Parameters can be done via e.g.:
    # Configure IOVDbMetaDataTool to serialize IOV metadata to ByteStream
    iovDbTool = cfg.getPublicTool("IOVDbMetaDataTool")
    iovDbTool.FoldersToSerializeToBSMetadata = ["/Digitization/Parameters"]
    log.info("Configured IOVDbMetaDataTool to serialize folders to ByteStream metadata: %s",
             iovDbTool.FoldersToSerializeToBSMetadata)

which could be added to RDOtoBS_Skeleton.py (see !84643)

  • LuminosityCondAlgConfig.py, BunchCrossingCondAlgConfig.py: Enable ByteStream metadata reading for MC

Misc:

  • MetaReader.py, AthFileLite.py: Fix parsing of metadata with '=' in values using split('=', 1)
Edited by Maciej Pawel Szymanski

Merge request reports

Loading