Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify nslots in RDataSource #17908

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RArrowDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ private:
std::shared_ptr<arrow::Table> fTable;
std::vector<std::pair<ULong64_t, ULong64_t>> fEntryRanges;
std::vector<std::string> fColumnNames;
size_t fNSlots = 0U;

std::vector<std::pair<size_t, size_t>> fGetterIndex; // (columnId, visitorId)
std::vector<std::unique_ptr<ROOT::Internal::RDF::TValueGetter>> fValueGetters; // Visitors to be used to track and get entries. One per column.
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RCsvDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ private:
std::int64_t fDataLineNumber = 0;
std::int64_t fLineNumber = 0; // used to skip the last lines
std::int64_t fMaxLineNumber = -1; // set to non-negative if fOptions.fSkipLastNLines is set
unsigned int fNSlots = 0U;
std::unique_ptr<ROOT::Internal::RRawFile> fCsvFile;
ULong64_t fEntryRangesRequested = 0ULL;
ULong64_t fProcessedLines = 0ULL; // marks the progress of the consumption of the csv lines
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RDF/RLazyDSImpl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class RLazyDS final : public ROOT::RDF::RDataSource {
const PointerHolderPtrs_t fPointerHoldersModels;
std::vector<PointerHolderPtrs_t> fPointerHolders;
std::vector<std::pair<ULong64_t, ULong64_t>> fEntryRanges{};
unsigned int fNSlots{0};

Record_t GetColumnReadersImpl(std::string_view colName, const std::type_info &id) final
{
Expand Down
2 changes: 2 additions & 0 deletions tree/dataframe/inc/ROOT/RDataSource.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ protected:

virtual std::string AsString() { return "generic data source"; };

unsigned int fNSlots{};

public:
RDataSource() = default;
// Rule of five
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RNTupleDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ class RNTupleDS final : public ROOT::RDF::RDataSource {
/// to new page sources when the files in the chain change.
std::vector<std::vector<Internal::RNTupleColumnReader *>> fActiveColumnReaders;

unsigned int fNSlots = 0;
ULong64_t fSeenEntries = 0; ///< The number of entries so far returned by GetEntryRanges()
std::vector<REntryRangeDS> fCurrentRanges; ///< Basis for the ranges returned by the last GetEntryRanges() call
std::vector<REntryRangeDS> fNextRanges; ///< Basis for the ranges populated by the PrepareNextRanges() call
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RRootDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace RDF {
/// It shows how to implement the RDataSource API for a complex kind of source such as TTrees.
class RRootDS final : public ROOT::RDF::RDataSource {
private:
unsigned int fNSlots = 0U;
std::string fTreeName;
std::string fFileNameGlob;
mutable TChain fModelChain; // Mutable needed for getting the column type name
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RSqliteDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ private:
void SqliteError(int errcode);

std::unique_ptr<Internal::RSqliteDSDataSet> fDataSet;
unsigned int fNSlots;
ULong64_t fNRow;
std::vector<std::string> fColumnNames;
std::vector<ETypes> fColumnTypes;
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RTrivialDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace RDF {
/// it returns entries from GetEntryRanges forever or until a Range stops the event loop (for test purposes).
class RTrivialDS final : public ROOT::RDF::RDataSource {
private:
unsigned int fNSlots = 0U;
ULong64_t fSize = 0ULL;
bool fSkipEvenEntries = false;
std::vector<std::pair<ULong64_t, ULong64_t>> fEntryRanges;
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/inc/ROOT/RVecDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class RVecDS final : public ROOT::RDF::RDataSource {
const PointerHolderPtrs_t fPointerHoldersModels;
std::vector<PointerHolderPtrs_t> fPointerHolders;
std::vector<std::pair<ULong64_t, ULong64_t>> fEntryRanges{};
unsigned int fNSlots{0};
std::function<void()> fDeleteRVecs;

Record_t GetColumnReadersImpl(std::string_view colName, const std::type_info &id)
Expand Down
2 changes: 1 addition & 1 deletion tree/dataframe/src/RSqliteDS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ constexpr char const *RSqliteDS::fgTypeNames[];
///
/// The constructor opens the sqlite file, prepares the query engine and determines the column names and types.
RSqliteDS::RSqliteDS(const std::string &fileName, const std::string &query)
: fDataSet(std::make_unique<Internal::RSqliteDSDataSet>()), fNSlots(0), fNRow(0)
: fDataSet(std::make_unique<Internal::RSqliteDSDataSet>()), fNRow(0)
{
static bool hasSqliteVfs = RegisterSqliteVfs();
if (!hasSqliteVfs)
Expand Down
1 change: 0 additions & 1 deletion tree/dataframe/test/RStreamingDS.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/// A RDataSource that provides multiple entry ranges
class RStreamingDS final : public ROOT::RDF::RDataSource {
unsigned int fNSlots = 0u;
unsigned int fCounter = 0u;
const int fAns = 42;
const int *fAnsPtr = &fAns;
Expand Down
Loading