|
21 | 21 | namespace o2::framework |
22 | 22 | { |
23 | 23 |
|
24 | | -/// Select which tuples of the original grouping policy are yielded. |
25 | | -/// IncludeEmpty preserves the existing stream, including empty associated slices. |
26 | | -/// SkipEmpty omits tuples with any empty association. Use it only when omitting |
27 | | -/// those tuples has no observable effect on the consumer, including counters, |
28 | | -/// normalization, window bookkeeping, random-number streams and diagnostics. |
29 | | -/// Window flags and neighbour counts retain their original-policy meaning: they |
30 | | -/// are not recomputed for surviving tuples, and a window may yield no tuple. |
31 | | -/// The grouping policy must terminate and advance without observable side effects; |
32 | | -/// an entirely empty association can end iteration without visiting every step. |
33 | 24 | enum class GroupedSlicePolicy { IncludeEmpty, |
34 | 25 | SkipEmpty }; |
35 | 26 |
|
@@ -221,13 +212,10 @@ struct GroupedCombinationsGenerator { |
221 | 212 | { |
222 | 213 | if constexpr ((SupportsEmptyAssociatedGate<As>::value && ...)) { |
223 | 214 | if (mSlicePolicy == GroupedSlicePolicy::SkipEmpty && !this->mIsEnd) { |
224 | | - // A globally empty association makes every original pair ineligible. |
225 | 215 | if (std::apply([](auto const&... tables) { return ((tables.size() == 0) || ...); }, *mAssociated)) { |
226 | 216 | GroupingPolicy::moveToEnd(); |
227 | 217 | return; |
228 | 218 | } |
229 | | - // Advance the unchanged policy. Never remove grouping rows or refill |
230 | | - // a window with a more distant partner after rejecting an empty pair. |
231 | 219 | while (!this->mIsEnd && !allAssociatedHaveRows(std::index_sequence_for<As...>{})) { |
232 | 220 | this->addOne(); |
233 | 221 | } |
@@ -278,15 +266,6 @@ struct GroupedCombinationsGenerator { |
278 | 266 | { |
279 | 267 | setTables(grouping, associated); |
280 | 268 | } |
281 | | - /// Opt in to the tuple filter described by GroupedSlicePolicy. |
282 | | - /// The type constraint accepts raw associated tables and excludes Join, Concat |
283 | | - /// and filtered associations. It does not validate sorting or cache contents. |
284 | | - /// As with sliceByCached, each matching association index must be sorted and |
285 | | - /// have an initialized sorted SliceCache entry for the current table/dataframe. |
286 | | - /// Grouping iterator indices must use the same coordinates as the cache keys. |
287 | | - /// The cache and bound tables must remain valid and unchanged during iteration. |
288 | | - /// Invalid/missing cache entries are not validated by this filter, and skipped |
289 | | - /// typed-slice construction need not reproduce diagnostics for invalid inputs. |
290 | 269 | template <typename... T2s> |
291 | 270 | GroupedCombinationsGenerator(const BP& binningPolicy, int catNeighbours, const T1& outsider, const G& grouping, const std::tuple<T2s...>& associated, SliceCache* cache, GroupedSlicePolicy slicePolicy) |
292 | 271 | requires((SupportsEmptyAssociatedGate<As>::value && ...)) |
|
0 commit comments