Skip to content

Rrivera/dma fix5#55

Merged
corrodis merged 2 commits into
developfrom
rrivera/DMAFix5
May 29, 2026
Merged

Rrivera/dma fix5#55
corrodis merged 2 commits into
developfrom
rrivera/DMAFix5

Conversation

@rrivera747
Copy link
Copy Markdown
Contributor

Works with small, big, and very big emulated ROC events. Works with Calo ROC in buffer test mode. Simon reports instability using Board Reader.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Mu2e SubEvent receiver generator to fetch already-assembled DTC_Event objects from the DTC interface (instead of manually building events from DTC_SubEvent payloads), aiming to improve robustness across a range of emulated ROC event sizes and buffer test modes.

Changes:

  • Added getNextDTCEventFragment which calls theInterface_->GetSubEventDataAsEvents(...) and converts returned events into DTCEVT fragments.
  • Switched getNext_ to use the new event-based path (leaving the old subevent-based implementation in place).

auto block = subevt->GetDataBlock(bl);
auto first = block->GetHeader();
std::string nn = "Packets per ROC " + std::to_string(bl);
metricMan->sendMetric(nn, first->GetPacketCount(), "Packages", 3, artdaq::MetricMode::Average);
Comment on lines +524 to +531

double hw_timestamp_rate = 1 / hwTime;
double hw_data_rate = frags.back()->sizeBytes() / hwTime;

metricMan->sendMetric("DTC Read Time", artdaq::TimeUtils::GetElapsedTime(after_read, after_copy), "s", 3, artdaq::MetricMode::Average);
metricMan->sendMetric("Fragment Prep Time", artdaq::TimeUtils::GetElapsedTime(before_read, after_read), "s", 3, artdaq::MetricMode::Average);
metricMan->sendMetric("HW Timestamp Rate", hw_timestamp_rate, "timestamps/s", 1, artdaq::MetricMode::Average);
metricMan->sendMetric("PCIe Transfer Rate", hw_data_rate, "B/s", 1, artdaq::MetricMode::Average);
Comment on lines +525 to +526
double hw_timestamp_rate = 1 / hwTime;
double hw_data_rate = frags.back()->sizeBytes() / hwTime;
@corrodis corrodis merged commit e03db33 into develop May 29, 2026
9 of 14 checks passed
@corrodis corrodis deleted the rrivera/DMAFix5 branch May 29, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants