13 namespace Experimental {
20 if (
id != colTypeId) {
21 std::string err =
"The type of column \"";
25 err +=
" but a different one has been selected.";
26 throw std::runtime_error(err);
31 std::vector<void *> ret(
fNSlots);
58 std::string
e =
"The dataset does not have column ";
60 throw std::runtime_error(e);
121 fChains[slot]->GetEntry(entry);
126 assert(0U ==
fNSlots &&
"Setting the number of slots even if the number of slots is different from zero.");
const std::type_info & TypeName2TypeID(const std::string &name)
Return the type_info associated to a name.
std::vector< std::vector< void * > > fBranchAddresses
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges()
Return ranges of entries to distribute to tasks.
R__EXTERN TVirtualMutex * gROOTMutex
const std::vector< std::string > & GetColumnNames() const
Returns a reference to the collection of the dataset's column names.
std::vector< void * > GetColumnReadersImpl(std::string_view, const std::type_info &)
type-erased vector of pointers to pointers to column values - one per slot
std::vector< std::string > fListOfBranches
std::string fFileNameGlob
virtual Long64_t GetEntries() const
Return the total number of entries in the chain.
std::string GetTypeName(std::string_view colName) const
Type of a column as a string, e.g.
void InitSlot(unsigned int slot, ULong64_t firstEntry)
Convenience method called at the start of the data processing associated to a slot.
std::vector< double * > fAddressesToFree
std::vector< std::unique_ptr< TChain > > fChains
TRootDS(std::string_view treeName, std::string_view fileNameGlob)
void SetEntry(unsigned int slot, ULong64_t entry)
Advance the "cursors" returned by GetColumnReaders to the selected entry for a particular slot...
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Get entry from the file to memory.
A pseudo container class which is a generator of indices.
unsigned long long ULong64_t
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
#define R__LOCKGUARD(mutex)
bool HasColumn(std::string_view colName) const
Checks if the dataset has a certain column.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
std::vector< std::pair< ULong64_t, ULong64_t > > fEntryRanges
TDataFrame MakeRootDataFrame(std::string_view treeName, std::string_view fileNameGlob)
Mother of all ROOT objects.
typedef void((*Func_t)())
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *tree, TCustomColumnBase *tmpBranch, TDataSource *ds)
Return a string containing the type of the given branch.
ROOT's TDataFrame offers a high level interface for analyses of data stored in TTrees.
A chain is a collection of files containing TTree objects.
void SetNSlots(unsigned int nSlots)
Inform TDataSource of the number of processing slots (i.e.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Set branch address.
void Initialise()
Convenience method called before starting an event-loop.
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.