Skip to content

Commit 375e98d

Browse files
dstoccoaphecetche
authored andcommitted
MID afterburner: apply delays only to self-triggered events
1 parent 91018e9 commit 375e98d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Detectors/MUON/MID/Workflow/src/TimingSpec.cxx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,14 @@ class TimingDeviceDPL
5656
std::array<std::vector<ROFRecord>, NEvTypes> outRofs;
5757

5858
for (size_t idx = 0; idx < NEvTypes; ++idx) {
59-
for (auto rof : inRofs[idx]) {
60-
applyElectronicsDelay(rof.interactionRecord.orbit, rof.interactionRecord.bc, mLocalToBC, mMaxBunches);
61-
outRofs[idx].emplace_back(rof);
59+
if (idx == static_cast<size_t>(EventType::Calib)) {
60+
// Delays do not apply to triggered events
61+
outRofs[idx].insert(outRofs[idx].end(), inRofs[idx].begin(), inRofs[idx].end());
62+
} else {
63+
for (auto rof : inRofs[idx]) {
64+
applyElectronicsDelay(rof.interactionRecord.orbit, rof.interactionRecord.bc, mLocalToBC, mMaxBunches);
65+
outRofs[idx].emplace_back(rof);
66+
}
6267
}
6368
pc.outputs().snapshot(mOutputs[idx], outRofs[idx]);
6469
}

0 commit comments

Comments
 (0)