afw.dataset.definitions.populate_files#

afw.dataset.definitions.populate_files(das_key: str, section: dict = {}, max_files: int = None)[source]#

Populates the files key for a given das key, and computes nevents and nevents_total. This will also add the fullName (DAS key) to the metadata.

Parameters:
  • das_key (str) – The das key to look up

  • section (dict, default {}) – The existing section to use, for passing along pre-existing metadata

  • max_files (int, default None) – If present, the amount of files to restrict to

Returns:

A dictionary with files and metadata keys.

Return type:

dict[str, dict]