Change to produce a fragment per DTC#1781
Conversation
|
Hi @michaelmackenzie,
which require these tests: build. @Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main. ⌛ The following tests have been triggered for 8761315: build (Build queue - API unavailable) |
There was a problem hiding this comment.
Pull request overview
This PR updates the DAQ digi-to-fragment producers to build and emit one DTCEVT fragment per DTC, rather than packing multiple DTC subevents into a single DTCLib::DTC_Event and then post-splitting.
Changes:
- Refactors both Straw and Calo fragment builders to produce
std::map<uint8_t, DTCLib::DTC_Event>(oneDTC_Eventper DTC). - Updates
produce()in both modules to loop over per-DTC events and emit oneartdaq::Fragmentper DTC. - Sets output fragment ID to the DTC ID for both tracker and calo fragment producers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| DAQ/src/StrawDigisToFragments_module.cc | Build per-DTC DTC_Events and emit one DTCEVT fragment per DTC (tracker). |
| DAQ/src/CaloDigisToFragments_module.cc | Build per-DTC DTC_Events and emit one DTCEVT fragment per DTC (calorimeter). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
☀️ The build tests passed at 8761315.
N.B. These results were obtained from a build of this Pull Request at 8761315 after being merged into the base branch at a31b07e. For more information, please check the job page here. |
|
I'll review this pull request by examining its details and changes.Here's my review of PR #1781. The core change refactors both 1. Inconsistent indentation in
|
| # | Severity | Issue |
|---|---|---|
| 1 | Low | Inconsistent indentation in function signature |
| 2 | Medium | Fragment ID collision risk between calo and tracker DTCs with same ID |
| 3 | Low | operator[] default-inserts empty map entries (benign but worth documenting) |
| 4 | Medium | Asymmetric size-mismatch handling — tracker silently emits potentially corrupt fragments |
| 5 | Low | Potential uint16_t overflow in transferByteCount (pre-existing) |
| 6 | Low | Test FCL may need explicit input tag for CaloDigisFromDTCEvents |
The most actionable items are #2 (fragment ID uniqueness) and #4 (matching the size-mismatch safety between the two modules).
|
Responding to the AI comments:
I also updated the test fcl to reflect these changes |
|
@FNALbuild build test |
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 1c924fc: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 1c924fc.
N.B. These results were obtained from a build of this Pull Request at 1c924fc after being merged into the base branch at a31b07e. For more information, please check the job page here. |
I don't see very much difference in the timing, but I think it's more correct to collect data into a fragment per DTC. I tested this on 20k MDC2020 and 20k MDC2025 events and found no issues in calo or tracker digis.