The head node of a RDF computation graph.
This class is responsible of running the event loop.
Definition at line 114 of file RLoopManager.hxx.
|
| RLoopManager (const RLoopManager &)=delete |
|
| RLoopManager (RLoopManager &&)=delete |
|
| RLoopManager (ROOT::RDF::Experimental::RDatasetSpec &&spec) |
|
| RLoopManager (std::unique_ptr< RDataSource > ds, const ColumnNames_t &defaultBranches) |
|
| RLoopManager (std::unique_ptr< TTree > tree, const ColumnNames_t &defaultBranches) |
|
| RLoopManager (TTree *tree, const ColumnNames_t &defaultBranches) |
|
| RLoopManager (ULong64_t nEmptyEntries) |
|
| ~RLoopManager () override |
|
void | AddDataSourceColumnReaders (const std::string &col, std::vector< std::unique_ptr< RColumnReaderBase > > &&readers, const std::type_info &ti) |
|
void | AddFilterName (std::vector< std::string > &) final |
| End of recursive chain of calls, does nothing.
|
|
void | AddSampleCallback (void *nodePtr, ROOT::RDF::SampleCallback_t &&callback) |
|
RColumnReaderBase * | AddTreeColumnReader (unsigned int slot, const std::string &col, std::unique_ptr< RColumnReaderBase > &&reader, const std::type_info &ti) |
| Register a new RTreeColumnReader with this RLoopManager.
|
|
void | ChangeBeginAndEndEntries (Long64_t begin, Long64_t end) |
|
void | ChangeSpec (ROOT::RDF::Experimental::RDatasetSpec &&spec) |
| Changes the internal TTree held by the RLoopManager.
|
|
bool | CheckFilters (unsigned int, Long64_t) final |
|
void | Deregister (RDefineBase *definePtr) |
|
void | Deregister (RDFInternal::RActionBase *actionPtr) |
|
void | Deregister (RDFInternal::RVariationBase *varPtr) |
|
void | Deregister (RFilterBase *filterPtr) |
|
void | Deregister (RRangeBase *rangePtr) |
|
std::vector< RDFInternal::RActionBase * > | GetAllActions () const |
| Return all actions, either booked or already run.
|
|
const ColumnNames_t & | GetBranchNames () |
| Return all valid TTree::Branch names (caching results for subsequent calls).
|
|
ROOT::Internal::RDF::RStringCache & | GetColumnNamesCache () |
|
RColumnReaderBase * | GetDatasetColumnReader (unsigned int slot, const std::string &col, const std::type_info &ti) const |
|
RDataSource * | GetDataSource () const |
|
const ColumnNames_t & | GetDefaultColumnNames () const |
| Return the list of default columns – empty if none was provided when constructing the RDataFrame.
|
|
::TDirectory * | GetDirectory () const |
|
std::vector< std::string > | GetFiltersNames () |
| For each booked filter, returns either the name or "Unnamed Filter".
|
|
std::shared_ptr< ROOT::Internal::RDF::GraphDrawing::GraphNode > | GetGraph (std::unordered_map< void *, std::shared_ptr< ROOT::Internal::RDF::GraphDrawing::GraphNode > > &visitedMap) final |
|
std::vector< RNodeBase * > | GetGraphEdges () const |
| Return all graph edges known to RLoopManager This includes Filters and Ranges but not Defines.
|
|
RLoopManager * | GetLoopManagerUnchecked () final |
|
ULong64_t | GetNEmptyEntries () const |
|
unsigned int | GetNRuns () const |
|
unsigned int | GetNSlots () const |
|
std::vector< std::string > & | GetSuppressErrorsForMissingBranches () |
|
const std::vector< std::string > & | GetSuppressErrorsForMissingBranches () const |
|
TTree * | GetTree () const |
|
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RDefinesWithReaders > > > & | GetUniqueDefinesWithReaders () |
|
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RVariationsWithReaders > > > & | GetUniqueVariationsWithReaders () |
|
bool | HasDataSourceColumnReaders (const std::string &col, const std::type_info &ti) const |
| Return true if AddDataSourceColumnReaders was called for column name col.
|
|
void | IncrChildrenCount () final |
|
void | Jit () |
| Add RDF nodes that require just-in-time compilation to the computation graph.
|
|
void | JitDeclarations () |
|
RLoopManager & | operator= (const RLoopManager &)=delete |
|
RLoopManager & | operator= (RLoopManager &&)=delete |
|
void | PartialReport (ROOT::RDF::RCutFlowReport &) const final |
| End of recursive chain of calls, does nothing.
|
|
void | Register (RDefineBase *definePtr) |
|
void | Register (RDFInternal::RActionBase *actionPtr) |
|
void | Register (RDFInternal::RVariationBase *varPtr) |
|
void | Register (RFilterBase *filterPtr) |
|
void | Register (RRangeBase *rangePtr) |
|
void | RegisterCallback (ULong64_t everyNEvents, std::function< void(unsigned int)> &&f) |
|
void | Report (ROOT::RDF::RCutFlowReport &rep) const final |
| Call FillReport on all booked filters.
|
|
void | Run (bool jit=true) |
| Start the event loop with a different mechanism depending on IMT/no IMT, data source/no data source.
|
|
void | SetEmptyEntryRange (std::pair< ULong64_t, ULong64_t > &&newRange) |
|
void | SetTree (std::shared_ptr< TTree > tree) |
|
void | StopProcessing () final |
|
void | ToJitExec (const std::string &) const |
|
| RNodeBase (const RNodeBase &)=delete |
|
| RNodeBase (const std::vector< std::string > &variations={}, RLoopManager *lm=nullptr) |
|
| RNodeBase (RNodeBase &&)=delete |
|
virtual | ~RNodeBase ()=default |
|
const std::vector< std::string > & | GetVariations () const |
|
virtual std::shared_ptr< RNodeBase > | GetVariedFilter (const std::string &) |
| Return a clone of this node that acts as a Filter working with values in the variationName "universe".
|
|
RNodeBase & | operator= (const RNodeBase &)=delete |
|
RNodeBase & | operator= (RNodeBase &&)=delete |
|
virtual void | ResetChildrenCount () |
|
|
void | CleanUpNodes () |
| Perform clean-up operations. To be called at the end of each event loop.
|
|
void | CleanUpTask (TTreeReader *r, unsigned int slot) |
| Perform clean-up operations. To be called at the end of each task execution.
|
|
void | EvalChildrenCounts () |
| Trigger counting of number of children nodes for each node of the functional graph.
|
|
void | InitNodes () |
| Initialize all nodes of the functional graph before running the event loop.
|
|
void | InitNodeSlots (TTreeReader *r, unsigned int slot) |
| Build TTreeReaderValues for all nodes This method loops over all filters, actions and other booked objects and calls their InitSlot method, to get them ready for running a task.
|
|
void | RunAndCheckFilters (unsigned int slot, Long64_t entry) |
| Execute actions and make sure named filters are called for each event.
|
|
void | RunDataSource () |
| Run event loop over data accessed through a DataSource, in sequence.
|
|
void | RunDataSourceMT () |
| Run event loop over data accessed through a DataSource, in parallel.
|
|
void | RunEmptySource () |
| Run event loop with no source files, in sequence.
|
|
void | RunEmptySourceMT () |
| Run event loop with no source files, in parallel.
|
|
void | RunTreeProcessorMT () |
| Run event loop over one or multiple ROOT files, in parallel.
|
|
void | RunTreeReader () |
| Run event loop over one or multiple ROOT files, in sequence.
|
|
void | SetupSampleCallbacks (TTreeReader *r, unsigned int slot) |
|
void | UpdateSampleInfo (unsigned int slot, const std::pair< ULong64_t, ULong64_t > &range) |
|
void | UpdateSampleInfo (unsigned int slot, TTreeReader &r) |
|
|
Long64_t | fBeginEntry {0} |
|
std::vector< RDFInternal::RActionBase * > | fBookedActions |
| Non-owning pointers to actions to be run.
|
|
std::vector< RDefineBase * > | fBookedDefines |
|
std::vector< RFilterBase * > | fBookedFilters |
|
std::vector< RFilterBase * > | fBookedNamedFilters |
| Contains a subset of fBookedFilters, i.e. only the named filters.
|
|
std::vector< RRangeBase * > | fBookedRanges |
|
std::vector< RDFInternal::RVariationBase * > | fBookedVariations |
|
ROOT::Internal::RDF::RStringCache | fCachedColNames |
|
std::vector< RDFInternal::RCallback > | fCallbacksEveryNEvents |
| Registered callbacks to be executed every N events.
|
|
std::vector< RDFInternal::ROneTimeCallback > | fCallbacksOnce |
| Registered callbacks to invoke just once before running the loop.
|
|
std::vector< std::unordered_map< std::string, std::unique_ptr< RColumnReaderBase > > > | fDatasetColumnReaders |
| Readers for TTree/RDataSource columns (one per slot), shared by all nodes in the computation graph.
|
|
const std::unique_ptr< RDataSource > | fDataSource |
| Owning pointer to a data-source object.
|
|
const ColumnNames_t | fDefaultColumns |
|
std::pair< ULong64_t, ULong64_t > | fEmptyEntryRange {} |
| Range of entries created when no data source is specified.
|
|
Long64_t | fEndEntry {std::numeric_limits<Long64_t>::max()} |
|
std::vector< std::unique_ptr< TChain > > | fFriends |
| Friends of the fTree. Only used if we constructed fTree ourselves.
|
|
const ELoopType | fLoopType |
| The kind of event loop that is going to be run (e.g. on ROOT files, on no files)
|
|
bool | fMustRunNamedFilters {true} |
|
RDFInternal::RNewSampleNotifier | fNewSampleNotifier |
|
ROOT::Internal::TreeUtils::RNoCleanupNotifier | fNoCleanupNotifier |
|
unsigned int | fNRuns {0} |
| Number of event loops run.
|
|
const unsigned int | fNSlots {1} |
|
std::vector< RDFInternal::RActionBase * > | fRunActions |
| Non-owning pointers to actions already run.
|
|
std::unordered_map< void *, ROOT::RDF::SampleCallback_t > | fSampleCallbacks |
| Registered callbacks to call at the beginning of each "data block".
|
|
std::vector< ROOT::RDF::RSampleInfo > | fSampleInfos |
|
std::unordered_map< std::string, ROOT::RDF::Experimental::RSample * > | fSampleMap |
| Keys are fname + "/" + treename as RSampleInfo::fID; Values are pointers to the corresponding sample.
|
|
std::vector< ROOT::RDF::Experimental::RSample > | fSamples |
| Samples need to survive throughout the whole event loop, hence stored as an attribute.
|
|
std::vector< std::string > | fSuppressErrorsForMissingBranches {} |
|
std::shared_ptr< TTree > | fTree {nullptr} |
| Shared pointer to the input TTree.
|
|
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RDefinesWithReaders > > > | fUniqueDefinesWithReaders |
|
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RVariationsWithReaders > > > | fUniqueVariationsWithReaders |
|
ColumnNames_t | fValidBranchNames |
| Cache of the tree/chain branch names. Never access directy, always use GetBranchNames().
|
|
void RLoopManager::EvalChildrenCounts |
( |
| ) |
|
|
private |
Trigger counting of number of children nodes for each node of the functional graph.
This is done once before starting the event loop. Each action sends an increase children count
signal upstream, which is propagated until RLoopManager. Each time a node receives the signal, in increments its children counter. Each node only propagates the signal once, even if it receives it multiple times. Named filters also send an increase children count
signal, just like actions, as they always execute during the event loop so the graph branch they belong to must count as active even if it does not end in an action.
Definition at line 878 of file RLoopManager.cxx.