Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RDF::RBookedDefines Class Reference

Encapsulates the columns defined by the user.

Definition at line 39 of file RBookedDefines.hxx.

Public Member Functions

 RBookedDefines ()
 Creates a new wrapper with empty maps.
 
 RBookedDefines (const RBookedDefines &)=default
 Copy-ctor for RBookedDefines.
 
 RBookedDefines (RBookedDefines &&)=default
 Move-ctor for RBookedDefines.
 
 RBookedDefines (RDefineBasePtrMapPtr_t defines, ColumnNamesPtr_t defineNames)
 Creates the object starting from the provided maps.
 
void AddColumn (const std::shared_ptr< RDFDetail::RDefineBase > &column, std::string_view name)
 Add a new booked column.
 
void AddName (std::string_view name)
 Add a new name to the list returned by GetNames without booking a new column.
 
const RDefineBasePtrMap_tGetColumns () const
 Returns the list of the pointers to the defined columns.
 
ColumnNames_t GetNames () const
 Returns the list of the names of the defined columns.
 
bool HasName (std::string_view name) const
 Check if the provided name is tracked in the names list.
 
RBookedDefinesoperator= (const RBookedDefines &)=default
 Copy-assignment operator for RBookedDefines.
 

Private Types

using ColumnNames_t = std::vector< std::string >
 
using ColumnNamesPtr_t = std::shared_ptr< const ColumnNames_t >
 
using RDefineBasePtrMap_t = std::map< std::string, std::shared_ptr< RDFDetail::RDefineBase > >
 
using RDefineBasePtrMapPtr_t = std::shared_ptr< const RDefineBasePtrMap_t >
 

Private Attributes

RDefineBasePtrMapPtr_t fDefines
 
ColumnNamesPtr_t fDefinesNames
 

#include <ROOT/RDF/RBookedDefines.hxx>

Member Typedef Documentation

◆ ColumnNames_t

using ROOT::Internal::RDF::RBookedDefines::ColumnNames_t = std::vector<std::string>
private

Definition at line 41 of file RBookedDefines.hxx.

◆ ColumnNamesPtr_t

Definition at line 45 of file RBookedDefines.hxx.

◆ RDefineBasePtrMap_t

using ROOT::Internal::RDF::RBookedDefines::RDefineBasePtrMap_t = std::map<std::string, std::shared_ptr<RDFDetail::RDefineBase> >
private

Definition at line 40 of file RBookedDefines.hxx.

◆ RDefineBasePtrMapPtr_t

Definition at line 44 of file RBookedDefines.hxx.

Constructor & Destructor Documentation

◆ RBookedDefines() [1/4]

ROOT::Internal::RDF::RBookedDefines::RBookedDefines ( const RBookedDefines )
default

Copy-ctor for RBookedDefines.

◆ RBookedDefines() [2/4]

ROOT::Internal::RDF::RBookedDefines::RBookedDefines ( RBookedDefines &&  )
default

Move-ctor for RBookedDefines.

◆ RBookedDefines() [3/4]

ROOT::Internal::RDF::RBookedDefines::RBookedDefines ( RDefineBasePtrMapPtr_t  defines,
ColumnNamesPtr_t  defineNames 
)
inline

Creates the object starting from the provided maps.

Definition at line 66 of file RBookedDefines.hxx.

◆ RBookedDefines() [4/4]

ROOT::Internal::RDF::RBookedDefines::RBookedDefines ( )
inline

Creates a new wrapper with empty maps.

Definition at line 73 of file RBookedDefines.hxx.

Member Function Documentation

◆ AddColumn()

void ROOT::Internal::RDF::RBookedDefines::AddColumn ( const std::shared_ptr< RDFDetail::RDefineBase > &  column,
std::string_view  name 
)

Add a new booked column.

Internally it recreates the map with the new column, and swaps it with the old one.

Definition at line 13 of file RDFBookedDefines.cxx.

◆ AddName()

void ROOT::Internal::RDF::RBookedDefines::AddName ( std::string_view  name)

Add a new name to the list returned by GetNames without booking a new column.

This is needed because we abuse fDefinesNames to also keep track of the aliases defined in each branch of the computation graph. Internally it recreates the vector with the new name, and swaps it with the old one.

Definition at line 22 of file RDFBookedDefines.cxx.

◆ GetColumns()

const RDefineBasePtrMap_t & ROOT::Internal::RDF::RBookedDefines::GetColumns ( ) const
inline

Returns the list of the pointers to the defined columns.

Definition at line 85 of file RBookedDefines.hxx.

◆ GetNames()

ColumnNames_t ROOT::Internal::RDF::RBookedDefines::GetNames ( ) const
inline

Returns the list of the names of the defined columns.

Definition at line 81 of file RBookedDefines.hxx.

◆ HasName()

bool ROOT::Internal::RDF::RBookedDefines::HasName ( std::string_view  name) const

Check if the provided name is tracked in the names list.

Definition at line 7 of file RDFBookedDefines.cxx.

◆ operator=()

RBookedDefines & ROOT::Internal::RDF::RBookedDefines::operator= ( const RBookedDefines )
default

Copy-assignment operator for RBookedDefines.

Member Data Documentation

◆ fDefines

RDefineBasePtrMapPtr_t ROOT::Internal::RDF::RBookedDefines::fDefines
private

Definition at line 48 of file RBookedDefines.hxx.

◆ fDefinesNames

ColumnNamesPtr_t ROOT::Internal::RDF::RBookedDefines::fDefinesNames
private

Definition at line 49 of file RBookedDefines.hxx.

Libraries for ROOT::Internal::RDF::RBookedDefines:

The documentation for this class was generated from the following files: