Dear ROOTers,
I want to learn how to implement a custom RDataSource, using the real cases in which I am already using the trick of creating empty RDataFrame and populating column with a series of Define().
For me it is easier to start without supporting multi-threading, since this is tricky from the point of view of the real, “back-end” sources.
The first question is on the method GetEntryRanges() to be implemented. I guess that I do not need to distribute always evenly the entries among slots, so I can bring this to the extreme and assign all the entries to the first slot and none to the others. How do the RDataFrame slot engine react to an empty list? Is it calling anyway any of the other slot methods?
Then a question on GetColumnReaders(), which I am implementing it on the basis what you call “new API” (unfortunately the only example is the quite complex RNTuple). I understand that this is called for each slot, so each thread will have its own instance of RColumnReaderBase-derived class. This means that if the low-level data buffers are owned and managed by this class instead of the overall custom RDataSource (it seems that I can choose both options), these are replicated for each thread avoiding (maybe) data contention.
Some clarification of these two points would be really useful.
Thanks,
Matteo
The question is quite general, but it should be supported by:
Built for linuxx8664gcc on Mar 15 2025, 21:37:19
From tags/v6-34-04@v6-34-04
With c++ (Debian 12.2.0-14) 12.2.0