Skip to content

[Feature]: FakeDataProdModule should populate detector ID in fake frame headers #481

@wesketchum

Description

@wesketchum

Description

Discovered when doing work for DUNE-DAQ/daqsystemtest#304

FakeDataProdModule generates fake frame data by zero-initializing a byte buffer of the correct size, leaving all header fields — including the detector ID — as zero. Downstream frame processors validating the detector ID in the frame header would fail when they receive det_id = 0.

Note that two distinct frame header types need to be considered when implementing the fix:

  • DAQEthHeader — used by Ethernet-based frames (DAPHNEEth, DAPHNEEthStream, WIBEth). Contains det_id of type DetID::Subdetector_t.
  • DAQHeader — used by older/legacy frame types. Needs investigation to determine if the same issue applies and what the correct field/encoding is.

Potential impact radius

Medium

Reason for change

Without this fix, FakeDataProdModule cannot be used as a stand-in for real readout when testing frame types that validate the detector ID.

Suggested implementations

Add a det_id string attribute (using the DetID::subdetector_to_string convention, e.g. "HD_PDS") to FakeDataProdConf in appmodel, defaulting to "Unknown" to preserve existing behavior. In FakeDataProdModule::process_data_request(), after allocating the fake data buffer, iterate over frames and write the correct detector ID into each frame header, conditioned on the configured header type.

Testing suggestions

Create fake data and verify that the det_id is properly set.

Anything else?

This should likely come up as part of the data formats review. (See https://github.com/DUNE-DAQ/daq-deliverables/issues/215)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions