Skip to content

Commit 99acf4c

Browse files
Added sbn::ExtraTriggerInfo::triggerFromBeamGate()
1 parent b5b628d commit 99acf4c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sbnobj/Common/Trigger/ExtraTriggerInfo.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ struct sbn::ExtraTriggerInfo {
252252
// --- END ---- Trigger topology ---------------------------------------------
253253

254254

255+
/// Returns the time from the beam gate to the trigger [ns].
256+
/// Only valid if beam gate timestamp is valid.
257+
constexpr std::int64_t triggerFromBeamGate() const
258+
{
259+
return static_cast<std::int64_t>(triggerTimestamp)
260+
- static_cast<std::int64_t>(beamGateTimestamp);
261+
}
255262

256263
/// Returns whether this object contains any valid information.
257264
constexpr bool isValid() const noexcept

0 commit comments

Comments
 (0)