Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RInterface.cxx
Go to the documentation of this file.
1// Author: Vincenzo Eduardo Padulano, Axel Naumann, Enrico Guiraud CERN 02/2023
2
3/*************************************************************************
4 * Copyright (C) 1995-2023, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
12
14 std::pair<ULong64_t, ULong64_t> &&newRange)
15{
16 R__ASSERT(newRange.second >= newRange.first && "end is less than begin in the passed entry range!");
17 node.GetLoopManager()->SetEmptyEntryRange(std::move(newRange));
18}
19
21{
22 R__ASSERT(end >= begin && "end is less than begin in the passed entry range!");
23 node.GetLoopManager()->ChangeBeginAndEndEntries(begin, end);
24}
25
26/**
27 * \brief Changes the input dataset specification of an RDataFrame.
28 *
29 * \param node Any node of the computation graph.
30 * \param spec The new specification.
31 */
33{
34 node.GetLoopManager()->ChangeSpec(std::move(spec));
35}
36
37/**
38 * \brief Trigger the execution of an RDataFrame computation graph.
39 * \param[in] node A node of the computation graph (not a result).
40 *
41 * This function calls the RLoopManager::Run method on the \p fLoopManager data
42 * member of the input argument. It is intended for internal use only.
43 */
45{
46 node.fLoopManager->Run();
47}
48
50{
51 if (node.fLoopManager->GetTree()) {
52 return "TTreeDS";
53 } else if (node.fDataSource) {
54 return node.fDataSource->GetLabel();
55 } else {
56 return "EmptyDS";
57 }
58}
long long Long64_t
Definition RtypesCore.h:69
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Definition TError.h:125
void SetEmptyEntryRange(std::pair< ULong64_t, ULong64_t > &&newRange)
void ChangeSpec(ROOT::RDF::Experimental::RDatasetSpec &&spec)
Changes the internal TTree held by the RLoopManager.
void ChangeBeginAndEndEntries(Long64_t begin, Long64_t end)
The dataset specification for RDataFrame.
virtual std::string GetLabel()
Return a string representation of the datasource type.
std::shared_ptr< ROOT::Detail::RDF::RLoopManager > fLoopManager
< The RLoopManager at the root of this computation graph. Never null.
RDataSource * fDataSource
Non-owning pointer to a data-source object. Null if no data-source. RLoopManager has ownership of the...
RDFDetail::RLoopManager * GetLoopManager() const
The public interface to the RDataFrame federation of classes.
void ChangeEmptyEntryRange(const ROOT::RDF::RNode &node, std::pair< ULong64_t, ULong64_t > &&newRange)
void ChangeSpec(const ROOT::RDF::RNode &node, ROOT::RDF::Experimental::RDatasetSpec &&spec)
Changes the input dataset specification of an RDataFrame.
std::string GetDataSourceLabel(const ROOT::RDF::RNode &node)
void TriggerRun(ROOT::RDF::RNode node)
Trigger the execution of an RDataFrame computation graph.
void ChangeBeginAndEndEntries(const RNode &node, Long64_t begin, Long64_t end)