Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t > Class Template Referencefinal

template<typename Helper, typename PrevNode, typename ColumnTypes_t>
class ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >

Just like an RAction, but it has N action helpers and N previous nodes (N is the number of variations).

Definition at line 40 of file RVariedAction.hxx.

Public Member Functions

 RVariedAction (const RVariedAction &)=delete
 
 RVariedAction (std::vector< Helper > &&helpers, const ColumnNames_t &columns, std::shared_ptr< PrevNode > prevNode, const RColumnRegister &colRegister)
 
 ~RVariedAction ()
 
template<typename... ColTypes, std::size_t... S>
void CallExec (unsigned int slot, unsigned int varIdx, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >)
 
std::unique_ptr< RActionBaseCloneAction (void *typeErasedResults) final
 
void Finalize () final
 Clean-up and finalize the action result (e.g.
 
void FinalizeSlot (unsigned int slot) final
 Clean-up operations to be performed at the end of a task.
 
std::shared_ptr< RDFGraphDrawing::GraphNodeGetGraph (std::unordered_map< void *, std::shared_ptr< RDFGraphDrawing::GraphNode > > &visitedMap) final
 
std::unique_ptr< RMergeableValueBaseGetMergeableValue () const final
 Retrieve a container holding the names and values of the variations.
 
ROOT::RDF::SampleCallback_t GetSampleCallback () final
 Return a callback that in turn runs the callbacks of each variation's helper.
 
void Initialize () final
 
void InitSlot (TTreeReader *r, unsigned int slot) final
 
std::unique_ptr< RActionBaseMakeVariedAction (std::vector< void * > &&) final
 
RVariedActionoperator= (const RVariedAction &)=delete
 
void * PartialUpdate (unsigned int slot) final
 Return the partially-updated value connected to the first variation.
 
void Run (unsigned int slot, Long64_t entry) final
 
void TriggerChildrenCount () final
 
- Public Member Functions inherited from ROOT::Internal::RDF::RActionBase
 RActionBase (const RActionBase &)=delete
 
 RActionBase (RLoopManager *lm, const ColumnNames_t &colNames, const RColumnRegister &colRegister, const std::vector< std::string > &prevVariations)
 
virtual ~RActionBase ()
 
RColumnRegisterGetColRegister ()
 
const ColumnNames_tGetColumnNames () const
 
RLoopManagerGetLoopManager ()
 
unsigned int GetNSlots () const
 
const std::vector< std::string > & GetVariations () const
 
virtual bool HasRun () const
 
RActionBaseoperator= (const RActionBase &)=delete
 
virtual void SetHasRun ()
 

Private Types

using PrevNodeType = std::conditional_t< std::is_same< PrevNode, RJittedFilter >::value, RFilterBase, PrevNode >
 
using TypeInd_t = std::make_index_sequence< ColumnTypes_t::list_size >
 

Private Member Functions

 RVariedAction (std::vector< Helper > &&helpers, const ColumnNames_t &columns, const std::vector< std::shared_ptr< PrevNodeType > > &prevNodes, const RColumnRegister &colRegister)
 This constructor takes in input a vector of previous nodes, motivated by the CloneAction logic.
 
std::vector< std::shared_ptr< PrevNodeType > > MakePrevFilters (std::shared_ptr< PrevNode > nominal) const
 Creates new filter nodes, one per variation, from the upstream nominal one.
 
void * PartialUpdateImpl (...)
 
template<typename H = Helper>
auto PartialUpdateImpl (unsigned int slot) -> decltype(std::declval< H >().PartialUpdate(slot),(void *)(nullptr))
 
void SetupClass ()
 

Private Attributes

std::vector< Helper > fHelpers
 Action helpers per variation.
 
std::vector< std::vector< std::array< RColumnReaderBase *, ColumnTypes_t::list_size > > > fInputValues
 Column readers per slot (outer dimension), per variation and per input column (inner dimension, std::array).
 
std::array< bool, ColumnTypes_t::list_size > fIsDefine
 The nth flag signals whether the nth input column is a custom column or not.
 
std::vector< std::shared_ptr< PrevNodeType > > fPrevNodes
 Owning pointers to upstream nodes for each systematic variation.
 

Additional Inherited Members

- Protected Attributes inherited from ROOT::Internal::RDF::RActionBase
RLoopManagerfLoopManager
 A raw pointer to the RLoopManager at the root of this functional graph.
 

#include <ROOT/RDF/RVariedAction.hxx>

Inheritance diagram for ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >:
[legend]

Member Typedef Documentation

◆ PrevNodeType

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
using ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::PrevNodeType = std::conditional_t<std::is_same<PrevNode, RJittedFilter>::value, RFilterBase, PrevNode>
private

Definition at line 44 of file RVariedAction.hxx.

◆ TypeInd_t

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
using ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::TypeInd_t = std::make_index_sequence<ColumnTypes_t::list_size>
private

Definition at line 41 of file RVariedAction.hxx.

Constructor & Destructor Documentation

◆ RVariedAction() [1/3]

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::RVariedAction ( std::vector< Helper > &&  helpers,
const ColumnNames_t columns,
const std::vector< std::shared_ptr< PrevNodeType > > &  prevNodes,
const RColumnRegister colRegister 
)
inlineprivate

This constructor takes in input a vector of previous nodes, motivated by the CloneAction logic.

Definition at line 101 of file RVariedAction.hxx.

◆ RVariedAction() [2/3]

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::RVariedAction ( std::vector< Helper > &&  helpers,
const ColumnNames_t columns,
std::shared_ptr< PrevNode >  prevNode,
const RColumnRegister colRegister 
)
inline

Definition at line 112 of file RVariedAction.hxx.

◆ RVariedAction() [3/3]

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::RVariedAction ( const RVariedAction< Helper, PrevNode, ColumnTypes_t > &  )
delete

◆ ~RVariedAction()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::~RVariedAction ( )
inline

Definition at line 125 of file RVariedAction.hxx.

Member Function Documentation

◆ CallExec()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
template<typename... ColTypes, std::size_t... S>
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::CallExec ( unsigned int  slot,
unsigned int  varIdx,
Long64_t  entry,
TypeList< ColTypes... >  ,
std::index_sequence< S... >   
)
inline

Definition at line 145 of file RVariedAction.hxx.

◆ CloneAction()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::unique_ptr< RActionBase > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::CloneAction ( void *  typeErasedResults)
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 241 of file RVariedAction.hxx.

◆ Finalize()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::Finalize ( )
inlinefinalvirtual

Clean-up and finalize the action result (e.g.

merging slot-local results). It invokes the helper's Finalize method.

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 173 of file RVariedAction.hxx.

◆ FinalizeSlot()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::FinalizeSlot ( unsigned int  slot)
inlinefinalvirtual

Clean-up operations to be performed at the end of a task.

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 165 of file RVariedAction.hxx.

◆ GetGraph()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::shared_ptr< RDFGraphDrawing::GraphNode > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::GetGraph ( std::unordered_map< void *, std::shared_ptr< RDFGraphDrawing::GraphNode > > &  visitedMap)
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 202 of file RVariedAction.hxx.

◆ GetMergeableValue()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::unique_ptr< RMergeableValueBase > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::GetMergeableValue ( ) const
inlinefinalvirtual

Retrieve a container holding the names and values of the variations.

It knows how to merge with others of the same type.

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 224 of file RVariedAction.hxx.

◆ GetSampleCallback()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
ROOT::RDF::SampleCallback_t ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::GetSampleCallback ( )
inlinefinalvirtual

Return a callback that in turn runs the callbacks of each variation's helper.

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 183 of file RVariedAction.hxx.

◆ Initialize()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::Initialize ( )
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 127 of file RVariedAction.hxx.

◆ InitSlot()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::InitSlot ( TTreeReader r,
unsigned int  slot 
)
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 132 of file RVariedAction.hxx.

◆ MakePrevFilters()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::vector< std::shared_ptr< PrevNodeType > > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::MakePrevFilters ( std::shared_ptr< PrevNode >  nominal) const
inlineprivate

Creates new filter nodes, one per variation, from the upstream nominal one.

Parameters
nominalThe nominal filter
Returns
The varied filters

The nominal filter is not included in the return value.

Definition at line 61 of file RVariedAction.hxx.

◆ MakeVariedAction()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::unique_ptr< RActionBase > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::MakeVariedAction ( std::vector< void * > &&  )
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 236 of file RVariedAction.hxx.

◆ operator=()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
RVariedAction & ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::operator= ( const RVariedAction< Helper, PrevNode, ColumnTypes_t > &  )
delete

◆ PartialUpdate()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void * ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::PartialUpdate ( unsigned int  slot)
inlinefinalvirtual

Return the partially-updated value connected to the first variation.

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 180 of file RVariedAction.hxx.

◆ PartialUpdateImpl() [1/2]

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void * ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::PartialUpdateImpl (   ...)
inlineprivate

Definition at line 267 of file RVariedAction.hxx.

◆ PartialUpdateImpl() [2/2]

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
template<typename H = Helper>
auto ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::PartialUpdateImpl ( unsigned int  slot) -> decltype(std::declval<H>().PartialUpdate(slot), (void *)(nullptr))
inlineprivate

Definition at line 261 of file RVariedAction.hxx.

◆ Run()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::Run ( unsigned int  slot,
Long64_t  entry 
)
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 151 of file RVariedAction.hxx.

◆ SetupClass()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::SetupClass ( )
inlineprivate

Definition at line 84 of file RVariedAction.hxx.

◆ TriggerChildrenCount()

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
void ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::TriggerChildrenCount ( )
inlinefinalvirtual

Implements ROOT::Internal::RDF::RActionBase.

Definition at line 159 of file RVariedAction.hxx.

Member Data Documentation

◆ fHelpers

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::vector<Helper> ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::fHelpers
private

Action helpers per variation.

Definition at line 46 of file RVariedAction.hxx.

◆ fInputValues

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::vector<std::vector<std::array<RColumnReaderBase *, ColumnTypes_t::list_size> > > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::fInputValues
private

Column readers per slot (outer dimension), per variation and per input column (inner dimension, std::array).

Definition at line 51 of file RVariedAction.hxx.

◆ fIsDefine

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::array<bool, ColumnTypes_t::list_size> ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::fIsDefine
private

The nth flag signals whether the nth input column is a custom column or not.

Definition at line 54 of file RVariedAction.hxx.

◆ fPrevNodes

template<typename Helper , typename PrevNode , typename ColumnTypes_t >
std::vector<std::shared_ptr<PrevNodeType> > ROOT::Internal::RDF::RVariedAction< Helper, PrevNode, ColumnTypes_t >::fPrevNodes
private

Owning pointers to upstream nodes for each systematic variation.

Definition at line 48 of file RVariedAction.hxx.

  • tree/dataframe/inc/ROOT/RDF/RVariedAction.hxx