Go Back to: C++ Manual General Site
LDMX.Packing package¶
Submodules¶
LDMX.Packing.decoding module¶
Configuration of decoders for raw data formats
- class LDMX.Packing.decoding.ECONDDecoder(instance_name: str = 'ECONDDecoder', histograms: list[Histogram] = <factory>, raw_data_name: str = None, raw_data_pass: str = '', digi_output_name: str = None, info_output_name: str = '', is_ecal: bool = None, n_links: int = 2, fiber: int = 0, translate_eid: bool = False, roc_version: int = 3)¶
Bases:
ProcessorDecode raw binary data assuming the ECON-D data format
The input is the buffer that SingleSubsystemUnpacker puts on the event bus holding all of the samples from a single ECON-D. The channel samples are put into an HgcrocDigiCollection and the rest of the packet data (headers, common modes, calibration channel, corruption flags) into an ECONDEventInfo. Corrupted packets are flagged and skipped, the digis are only filled if all samples of the event decoded without problems.
A summary of the decoding is logged at the information level at the end of processing, use
p.logger.custom(decoder, level=1)to see it.- Parameters:
raw_data_name (str) – name of the buffer put on the bus by SingleSubsystemUnpacker
raw_data_pass (str) – pass of the buffer (empty means any pass)
digi_output_name (str) – name of the output HgcrocDigiCollection
info_output_name (str) – name of the output ECONDEventInfo, defaults to digi_output_name + “ECONDInfo”
is_ecal (bool) – True for ECal (EcalElectronicsID), False for HCal (HcalElectronicsID)
n_links (int) – number of enabled eRx on the ECON-D
fiber (int) – optical fiber index used in the electronics ID
translate_eid (bool) – translate the electronics IDs into detector IDs using the detector map conditions object
roc_version (int) – HGCROC version stored in the HgcrocDigiCollection
- class_name: str = 'packing::ECONDDecoder'¶
- digi_output_name: str = None¶
- fiber: int = 0¶
- info_output_name: str = ''¶
- instance_name: str = 'ECONDDecoder'¶
- is_ecal: bool = None¶
- module_name: str = 'Packing'¶
- n_links: int = 2¶
- raw_data_name: str = None¶
- raw_data_pass: str = ''¶
- roc_version: int = 3¶
- translate_eid: bool = False¶
LDMX.Packing.rawio module¶
Module for configuring a raw data file
- class LDMX.Packing.rawio.FiberTrackerRawDecoder(instance_name: str = 'FiberTrackerRawDecoder', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, input_file: str = '', output_name: str = '', ntuplize: bool = True)¶
Bases:
Processor- class_name: str = 'packing::FiberTrackerRawDecoder'¶
- input_file: str = ''¶
- instance_name: str = 'FiberTrackerRawDecoder'¶
- module_name: str = 'Packing'¶
- ntuplize: bool = True¶
- output_name: str = ''¶
- class LDMX.Packing.rawio.RawDataFile(filename: str = '', is_output: bool = False, ecal_object_name: str = 'EcalRaw', hcal_object_name: str = 'HcalRaw', tracker_object_name: str = 'TrackerRaw', triggerpad_object_name: str = 'TriggerPadRaw', pass_name: str = '', skip_unavailable: bool = True, ecal_object_passname_: str = '', hcal_object_passname_: str = '', triggerpad_object_passname_: str = '', tracker_object_event_passname_: str = '')¶
Bases:
objectRawDataFile configuration class
- static destination(file_name)¶
- ecal_object_name: str = 'EcalRaw'¶
- ecal_object_passname_: str = ''¶
- filename: str = ''¶
- hcal_object_name: str = 'HcalRaw'¶
- hcal_object_passname_: str = ''¶
- is_output: bool = False¶
- pass_name: str = ''¶
- static source(file_name)¶
- tracker_object_event_passname_: str = ''¶
- tracker_object_name: str = 'TrackerRaw'¶
- triggerpad_object_name: str = 'TriggerPadRaw'¶
- triggerpad_object_passname_: str = ''¶
- class LDMX.Packing.rawio.RawIO(instance_name: str = 'RawIO', histograms: list[Histogram] = <factory>, raw_file: RawDataFile = <factory>)¶
Bases:
ProcessorProducer which runs a single raw data file for input/output
This producer does _nothing_ except pass handles to the RawDataFile for reading or writing. We are just wrapping a configuration class for the underlying raw data file, so we modify parameters via the raw_file member variable.
rawinput = RawIO.source(‘my_data.raw’) rawinput.raw_file.ecal_object_name = ‘2Ecal2Raw’
- class_name: str = 'packing::RawIO'¶
- static destination(file_name)¶
- instance_name: str = 'RawIO'¶
- module_name: str = 'Packing'¶
- raw_file: RawDataFile¶
- static source(file_name)¶
- class LDMX.Packing.rawio.SingleSubsystemPacker(instance_name: str = 'SingleSubsystemPacker', histograms: list[Histogram] = <factory>, raw_file: str = '', input_name: str = '', input_pass: str = '')¶
Bases:
ProcessorConfiguration for packing a single subsystem’s encoded buffer into a raw data file in sequence.
- Parameters:
raw_file (str) – File path to raw data file to write out
input_name (str) – event bus object name for encoded buffer
input_pass (str) – event bus object pass for encoded buffer
- class_name: str = 'packing::SingleSubsystemPacker'¶
- input_name: str = ''¶
- input_pass: str = ''¶
- instance_name: str = 'SingleSubsystemPacker'¶
- module_name: str = 'Packing'¶
- raw_file: str = ''¶
- class LDMX.Packing.rawio.SingleSubsystemUnpacker(instance_name: str = 'SingleSubsystemUnpacker', histograms: list[Histogram] = <factory>, dat_file: str = '', output_name: str = '', subsystem: int = -1, subsystem_name: str = '', contributor: int = -1, frame_offset: int = 0)¶
Bases:
ProcessorConfiguration for unpacking a single subsystem’s raw data file into a series of vector buffers to put onto the event bus.
- Parameters:
dat_file (str) – File path to raw data file to read in
output_name (str) – Name of buffer object for event bus
subsystem (int) – subsystem ID number to filter for (-1 if using subsystem_name)
subsystem_name (str) – subsystem name to filter for (empty if using subsystem int)
contributor (int) – contributor ID number to filter for (-1 means don’t apply the filter)
frame_offset (int) – number of frames for the subsystem to skip at the beginning of the file
- class_name: str = 'packing::SingleSubsystemUnpacker'¶
- contributor: int = -1¶
- dat_file: str = ''¶
- frame_offset: int = 0¶
- instance_name: str = 'SingleSubsystemUnpacker'¶
- module_name: str = 'Packing'¶
- output_name: str = ''¶
- subsystem: int = -1¶
- subsystem_name: str = ''¶
- class LDMX.Packing.rawio.WRRawDecoder(instance_name: str = 'wr', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, input_file: str = '', output_name: str = '', ntuplize: bool = True)¶
Bases:
Processor- class_name: str = 'packing::WRRawDecoder'¶
- input_file: str = ''¶
- instance_name: str = 'wr'¶
- module_name: str = 'Packing'¶
- ntuplize: bool = True¶
- output_name: str = ''¶