Micromegas decoder update#4297
Conversation
check the difference between the requested BCO and the last BCO found in the TPOT data stream, including some extra delay corresponding to how much time it takes for TPOT to send all the data for said trigger.
- also store per FEE packet id.
- do not save hits for which there is no waveforms.
…rollover. Based on Jin's code.
|
Warning Review limit reached
More reviews will be available in 41 minutes and 25 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refactors Micromegas BCO matching and raw-hit processing to use rollover-aware signed/unsigned clock-difference utilities, restructure internal state from separate "first" fields to a paired reference type, and change FillPool from event-count-based to target-BCO-driven control flow with per-FEE waveform recovery. ChangesBCO Matching and Raw-Hit Refactor
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
offline/framework/fun4allraw/SingleMicromegasPoolInput_v2.cc (1)
964-990:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDo not publish zero-waveform hits.
This path always allocates and registers a
MicromegasRawHit, even if waveform extraction produced no ADC segments. That creates hits with no payload in both the streaming manager and the per-FEE cache, which is the same invalid state the recovery path already filters out.Suggested fix
- // create new hit + if (payload.waveforms.empty()) + { + continue; + } + + // create new hit auto newhit = std::make_unique<MicromegasRawHit_impl>();
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a6bf1576-7fe2-427d-814d-4c545b5f1eaf
📒 Files selected for processing (7)
offline/framework/ffarawobjects/MicromegasRawHitv3.ccoffline/framework/ffarawobjects/MicromegasRawHitv3.hoffline/framework/fun4allraw/Fun4AllStreamingInputManager.ccoffline/framework/fun4allraw/MicromegasBcoMatchingInformation_v2.ccoffline/framework/fun4allraw/MicromegasBcoMatchingInformation_v2.hoffline/framework/fun4allraw/SingleMicromegasPoolInput_v2.ccoffline/framework/fun4allraw/SingleMicromegasPoolInput_v2.h
Build & test reportReport for commit a2a8dfbcd55646e696c2446241acc63d192faa92:
Automatically generated by sPHENIX Jenkins continuous integration |




This is TPOT fix for overlapping time frames, similar to #4292
TPOT decoder still uses taggers (GTM and enddat) to associate FEE data to 40bits gtm BCO, unlike the TPC, but this is really an orthogonal change.
Types of changes
What kind of change does this PR introduce? (Bug fix, feature, ...)
TODOs (if applicable)
Links to other PRs in macros and calibration repositories (if applicable)
Micromegas Decoder Update: Overlapping Time Frames Fix
Motivation / context
Fix overlapping time-frame handling in the Micromegas (TPOT) decoder so FEE data aligned to GTM 40-bit BCOs are correctly associated and truncated/overlapping waveforms are recovered. Change mirrors approach used in the recent TPC time-frame work (PR 4292) while keeping the existing GTM/enddat tagging behavior for mapping FEE data to GTM BCOs.
Key changes
Potential risk areas
Possible future improvements
Note: AI-generated summaries can be incorrect or incomplete. Review the changed files (particularly BCO matching, FillPool/recovery logic, and the raw-hit interface) carefully before approving for production.