The implementation of the DefaultValueFor transformation.
The class takes in the default value provided by the user to fill-in missing values of the input column. During the Update step, the class checks for the presence of the value of the column at the current event. If that value is missing, it will return the default value to requesting nodes of the graph.
Definition at line 45 of file RDefaultValueFor.hxx.
Public Member Functions | |
RDefaultValueFor (const RDefaultValueFor &)=delete | |
RDefaultValueFor (RDefaultValueFor &&)=delete | |
RDefaultValueFor (std::string_view name, std::string_view type, const T &defaultValue, const ROOT::RDF::ColumnNames_t &columns, const RDFInternal::RColumnRegister &colRegister, RLoopManager &lm, const std::string &variationName="nominal") | |
~RDefaultValueFor () | |
void | FinalizeSlot (unsigned int slot) final |
Clean-up operations to be performed at the end of a task. | |
const std::type_info & | GetTypeId () const final |
void * | GetValuePtr (unsigned int slot) final |
Return the (type-erased) address of the Define'd value for the given processing slot. | |
RDefineBase & | GetVariedDefine (const std::string &variationName) final |
Return a clone of this Define that works with values in the variationName "universe". | |
void | InitSlot (TTreeReader *r, unsigned int slot) final |
void | MakeVariations (const std::vector< std::string > &variations) final |
Create clones of this Define that work with values in varied "universes". | |
RDefaultValueFor & | operator= (const RDefaultValueFor &)=delete |
RDefaultValueFor & | operator= (RDefaultValueFor &&)=delete |
void | Update (unsigned int slot, Long64_t entry) final |
Update the value at the address returned by GetValuePtr with the content corresponding to the given entry. | |
void | Update (unsigned int, const ROOT::RDF::RSampleInfo &) final |
Update function to be called once per sample, used if the derived type is a RDefinePerSample. | |
Public Member Functions inherited from ROOT::Detail::RDF::RDefineBase | |
RDefineBase (std::string_view name, std::string_view type, const RDFInternal::RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &columnNames, const std::string &variationName="nominal") | |
virtual | ~RDefineBase () |
std::string | GetName () const |
std::string | GetTypeName () const |
const std::vector< std::string > & | GetVariations () const |
RDefineBase & | operator= (const RDefineBase &)=delete |
RDefineBase & | operator= (RDefineBase &&)=delete |
Private Types | |
using | ColumnTypes_t = ROOT::TypeTraits::TypeList< T > |
using | TypeInd_t = std::make_index_sequence< ColumnTypes_t::list_size > |
using | ValuesPerSlot_t = std::conditional_t< std::is_same< T, bool >::value, std::deque< T >, std::vector< T > > |
Private Member Functions | |
T & | GetValueOrDefault (unsigned int slot, Long64_t entry) |
Private Attributes | |
T | fDefaultValue |
ValuesPerSlot_t | fLastResults |
std::vector< RColumnReaderBase * > | fValues |
std::unordered_map< std::string, std::unique_ptr< RDefineBase > > | fVariedDefines |
Define objects corresponding to systematic variations other than nominal for this defined column. | |
Additional Inherited Members | |
Protected Attributes inherited from ROOT::Detail::RDF::RDefineBase | |
RDFInternal::RColumnRegister | fColRegister |
const ROOT::RDF::ColumnNames_t | fColumnNames |
ROOT::RVecB | fIsDefine |
The nth flag signals whether the nth input column is a custom column or not. | |
std::vector< Long64_t > | fLastCheckedEntry |
RLoopManager * | fLoopManager |
const std::string | fName |
The name of the custom column. | |
const std::string | fType |
The type of the custom column as a text string. | |
std::string | fVariation |
This indicates for what variation this define evaluates values. | |
std::vector< std::string > | fVariationDeps |
List of systematic variations that affect the value of this define. | |
#include <ROOT/RDF/RDefaultValueFor.hxx>
|
private |
Definition at line 46 of file RDefaultValueFor.hxx.
|
private |
Definition at line 47 of file RDefaultValueFor.hxx.
|
private |
Definition at line 49 of file RDefaultValueFor.hxx.
|
inline |
Definition at line 69 of file RDefaultValueFor.hxx.
|
delete |
|
delete |
|
inline |
Definition at line 86 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Clean-up operations to be performed at the end of a task.
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 120 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 117 of file RDefaultValueFor.hxx.
|
inlineprivate |
Definition at line 60 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Return the (type-erased) address of the Define'd value for the given processing slot.
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 100 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Return a clone of this Define that works with values in the variationName "universe".
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 148 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 92 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Create clones of this Define that work with values in varied "universes".
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 129 of file RDefaultValueFor.hxx.
|
delete |
|
delete |
|
inlinefinalvirtual |
Update the value at the address returned by GetValuePtr with the content corresponding to the given entry.
Implements ROOT::Detail::RDF::RDefineBase.
Definition at line 106 of file RDefaultValueFor.hxx.
|
inlinefinalvirtual |
Update function to be called once per sample, used if the derived type is a RDefinePerSample.
Reimplemented from ROOT::Detail::RDF::RDefineBase.
Definition at line 115 of file RDefaultValueFor.hxx.
|
private |
Definition at line 51 of file RDefaultValueFor.hxx.
|
private |
Definition at line 52 of file RDefaultValueFor.hxx.
|
private |
Definition at line 54 of file RDefaultValueFor.hxx.
|
private |
Define objects corresponding to systematic variations other than nominal for this defined column.
The map key is the full variation name, e.g. "pt:up".
Definition at line 58 of file RDefaultValueFor.hxx.