analyzer.modules.common.skimming

Attributes

Classes

SaveEvents

Analyzer module that serializes and persists event-level data to ROOT files.

Functions

isRootcompat(a)

Is it a flat or 1-d jagged array?

uprootWriteable(events)

Restrict to columns that uproot can write compactly

Module Contents

analyzer.modules.common.skimming.logger[source]
analyzer.modules.common.skimming.isRootcompat(a)[source]

Is it a flat or 1-d jagged array?

analyzer.modules.common.skimming.uprootWriteable(events)[source]

Restrict to columns that uproot can write compactly

class analyzer.modules.common.skimming.SaveEvents[source]

Bases: analyzer.core.analysis_modules.AnalyzerModule

Analyzer module that serializes and persists event-level data to ROOT files.

SaveEvents writes the full event record from the current analysis columns to a ROOT file using uproot. Files are written locally first and then copied to a target destination defined by a configurable output path template.

Each unique input (as defined by getKeyNoParams) is written at most once per process execution.

Parameters

prefixstr

Destination directory prefix where the output ROOT files will be copied. This may be a local or remote path, depending on the configured copy backend.

output_formatstr, optional

Filename template used to construct the final output path. The template is expanded using metadata fields from columns.metadata, plus the following automatically provided fields:

  • file_id : MD5 hash of the input file path

  • uuid : Random UUID to guarantee local filename uniqueness

Default: "{dataset_name}__{sample_name}__{file_id}__{chunk.event_start}_{chunk.event_stop}.root"

prefix: str[source]
output_format: str = '{dataset_name}__{sample_name}__{file_id}__{chunk.event_start}_{chunk.event_stop}.root'[source]
run(columns, params)[source]
inputs(metadata)[source]
outputs(metadata)[source]