Skip to content

Commit cbfedce

Browse files
authored
DPL Analysis: make WritingCursor aware of how many rows were written (#3069)
1 parent 2d9a391 commit cbfedce

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Framework/Core/include/Framework/AnalysisTask.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,20 @@ struct WritingCursor<soa::Table<PC...>> {
7171
void operator()(T... args)
7272
{
7373
static_assert(sizeof...(PC) == sizeof...(T), "Argument number mismatch");
74+
++mCount;
7475
cursor(0, extract(args)...);
7576
}
7677

78+
/// Last index inserted in the table
79+
int64_t lastIndex()
80+
{
81+
return mCount;
82+
}
83+
7784
bool resetCursor(TableBuilder& builder)
7885
{
7986
cursor = std::move(FFL(builder.cursor<persistent_table_t>()));
87+
mCount = -1;
8088
return true;
8189
}
8290

@@ -93,6 +101,8 @@ struct WritingCursor<soa::Table<PC...>> {
93101
return arg;
94102
}
95103
}
104+
105+
int64_t mCount = -1;
96106
};
97107

98108
/// This helper class allow you to declare things which will be crated by a

0 commit comments

Comments
 (0)