analyzer.modules.common.skimming¶
Attributes¶
Classes¶
Analyzer module that serializes and persists event-level data to ROOT files. |
Functions¶
|
Is it a flat or 1-d jagged array? |
|
Restrict to columns that uproot can write compactly |
Module Contents¶
- 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.AnalyzerModuleAnalyzer 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 pathuuid: Random UUID to guarantee local filename uniqueness
Default:
"{dataset_name}__{sample_name}__{file_id}__{chunk.event_start}_{chunk.event_stop}.root"