Skip to content

Commit 8ea7803

Browse files
wiechuladavidrohr
authored andcommitted
define one event as a TF
1 parent 7cd1960 commit 8ea7803

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Detectors/TPC/reconstruction/src/RawReaderCRU.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ RawReaderCRUEventSync::EventInfo& RawReaderCRUEventSync::createEvent(const RDH&
5252

5353
for (auto& ev : mEventInformation) {
5454
const auto hbMatch = ev.hasHearbeatOrbit(heartbeatOrbit);
55+
const long hbDiff = long(heartbeatOrbit) - long(ev.HeartbeatOrbits.front());
5556
if (hbMatch) {
5657
mLastEvent = &ev;
5758
return ev;
58-
} else if (std::abs(long(ev.HeartbeatOrbits.back()) - long(heartbeatOrbit)) < 54) {
59+
} else if ((hbDiff >= 0) && (hbDiff < 256)) {
5960
ev.HeartbeatOrbits.emplace_back(heartbeatOrbit);
61+
std::sort(ev.HeartbeatOrbits.begin(), ev.HeartbeatOrbits.end());
6062
mLastEvent = &ev;
6163
return ev;
6264
}

0 commit comments

Comments
 (0)