27 if (
id != colTypeId) {
28 std::string err =
"The type of column \"";
32 err +=
" but a different one has been selected.";
33 throw std::runtime_error(err);
38 std::vector<void *> ret(
fNSlots);
46 : fTreeName(treeName), fFileNameGlob(fileNameGlob), fModelChain(std::string(treeName).c_str())
67 return files->GetEntries();
74 std::string
e =
"The dataset does not have column ";
76 throw std::runtime_error(
e);
104 chain->GetEntry(firstEntry);
111 chain->SetBranchAddress(colName, &addr,
nullptr, typeClass,
EDataType(0),
true);
117 chain->SetBranchAddress(colName, addr);
136 fChains[slot]->GetEntry(entry);
142 assert(0U ==
fNSlots &&
"Setting the number of slots even if the number of slots is different from zero.");
unsigned long long ULong64_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
std::string fFileNameGlob
bool SetEntry(unsigned int slot, ULong64_t entry) final
Advance the "cursors" returned by GetColumnReaders to the selected entry for a particular slot.
void SetNSlots(unsigned int nSlots) final
Inform RDataSource of the number of processing slots (i.e.
const std::vector< std::string > & GetColumnNames() const final
Returns a reference to the collection of the dataset's column names.
void FinalizeSlot(unsigned int slot) final
Convenience method called at the end of the data processing associated to a slot.
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges() final
Return ranges of entries to distribute to tasks.
std::string GetTypeName(std::string_view colName) const final
Type of a column as a string, e.g.
RRootDS(std::string_view treeName, std::string_view fileNameGlob)
std::vector< std::vector< void * > > fBranchAddresses
std::vector< void * > GetColumnReadersImpl(std::string_view, const std::type_info &) final
type-erased vector of pointers to pointers to column values - one per slot
std::vector< std::unique_ptr< TChain > > fChains
bool HasColumn(std::string_view colName) const final
Checks if the dataset has a certain column.
void InitSlot(unsigned int slot, ULong64_t firstEntry) final
Convenience method called at the start of the data processing associated to a slot.
std::vector< std::string > fListOfBranches
void Initialize() final
Convenience method called before starting an event-loop.
std::vector< double * > fAddressesToFree
std::string GetLabel() final
Return a string representation of the datasource type.
std::size_t GetNFiles() const final
Returns the number of files from which the dataset is constructed.
std::vector< std::pair< ULong64_t, ULong64_t > > fEntryRanges
A chain is a collection of files containing TTree objects.
TObjArray * GetListOfBranches() override
Return a pointer to the list of branches of the current tree.
TObjArray * GetListOfFiles() const
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
Long64_t GetEntries() const override
Return the total number of entries in the chain.
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.
static TIterCategory End()
Int_t GetEntriesUnsafe() const
Return the number of objects in array (i.e.
Mother of all ROOT objects.
const std::type_info & TypeName2TypeID(const std::string &name)
Return the type_info associated to a name.
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *, RDataSource *, RDefineBase *, bool vector2RVec=true)
Return a string containing the type of the given branch.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
TSeq< unsigned int > TSeqU