127 std::vector<SimpleEvent>
events;
128 events.emplace_back(
EventID{1, 1, 3},
false);
129 events.emplace_back(
EventID{1, 1, 4},
false);
130 events.emplace_back(
EventID{1, 1, 5},
false);
132 auto const& srHandler = srHandlers[1];
134 for (
auto const&
e : events) {
135 srHandler->update(
e.id,
e.lastInSubRun);
136 rHandler->update(
e.id,
e.lastInSubRun);
141 srHandler->maybeSplitRange();
142 rHandler->maybeSplitRange();
145 std::vector<EventRange> subRunRef;
146 subRunRef.emplace_back(1, 1, 6);
147 RangeSet const subRunRSRef{1, subRunRef};
148 BOOST_TEST(srHandler->seenRanges() == subRunRSRef);
152 std::vector<EventRange> runRef;
153 runRef.emplace_back(0, 5, 11);
154 runRef.emplace_back(1, 1, 6);
156 BOOST_TEST(rHandler->seenRanges() == runRSRef);
165 srHandler->update(lastEvent.id, lastEvent.lastInSubRun);
166 rHandler->update(lastEvent.id, lastEvent.lastInSubRun);
169 srHandler->flushRanges();
170 rHandler->flushRanges();
172 std::vector<EventRange> subRunRef;
173 subRunRef.emplace_back(1, 6, 7);
174 subRunRef.emplace_back(1, 9, 15);
175 RangeSet const subRunRSRef{1, subRunRef};
176 BOOST_TEST(srHandler->seenRanges() == subRunRSRef);
179 std::vector<EventRange> runRef;
180 runRef.emplace_back(1, 6, 7);
181 runRef.emplace_back(1, 9, 15);
182 runRef.emplace_back(2, 3, 15);
184 BOOST_TEST(rHandler->seenRanges() == runRSRef);