11#ifndef ROOT_RDF_RDefaultValueFor 
   12#define ROOT_RDF_RDefaultValueFor 
   47   using TypeInd_t = std::make_index_sequence<ColumnTypes_t::list_size>;
 
   49   using ValuesPerSlot_t = std::conditional_t<std::is_same<T, bool>::value, std::deque<T>, std::vector<T>>;
 
   58   std::unordered_map<std::string, std::unique_ptr<RDefineBase>> 
fVariedDefines;
 
   73        fDefaultValue(defaultValue),
 
   74        fLastResults(
lm.GetNSlots() * 
RDFInternal::CacheLineStep<T>()),
 
   75        fValues(
lm.GetNSlots())
 
   77      fLoopManager->Register(
this);
 
   79      fLoopManager->InsertSuppressErrorsForMissingBranch(fColumnNames[0]);
 
 
   88      fLoopManager->Deregister(
this);
 
   89      fLoopManager->EraseSuppressErrorsForMissingBranch(fColumnNames[0]);
 
 
   96                                      *fLoopManager, 
r, fColumnNames[0], 
typeid(T));
 
   97      fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()] = -1;
 
 
  103      return static_cast<void *
>(&fLastResults[
slot * RDFInternal::CacheLineStep<T>()]);
 
 
  109      if (
entry != fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()]) {
 
  111         fLastResults[
slot * RDFInternal::CacheLineStep<T>()] = GetValueOrDefault(
slot, 
entry);
 
  112         fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()] = 
entry;
 
 
  123      fValues[
slot] = 
nullptr;
 
  125      for (
auto &
e : fVariedDefines)
 
  126         e.second->FinalizeSlot(
slot);
 
 
  132      for (
const auto &
variation : variations) {
 
  133         if (std::find(fVariationDeps.begin(), fVariationDeps.end(), 
variation) == fVariationDeps.end()) {
 
  137         if (fVariedDefines.find(
variation) != fVariedDefines.end())
 
 
  152      if (it == fVariedDefines.end()) {
 
  155         assert(std::find(fVariationDeps.begin(), fVariationDeps.end(), 
variationName) == fVariationDeps.end());
 
  159      return *(it->second);
 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
The implementation of the DefaultValueFor transformation.
 
void * GetValuePtr(unsigned int slot) final
Return the (type-erased) address of the Define'd value for the given processing slot.
 
std::unordered_map< std::string, std::unique_ptr< RDefineBase > > fVariedDefines
Define objects corresponding to systematic variations other than nominal for this defined column.
 
RDefaultValueFor(RDefaultValueFor &&)=delete
 
std::vector< RColumnReaderBase * > fValues
 
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 FinalizeSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
 
std::make_index_sequence< ColumnTypes_t::list_size > TypeInd_t
 
RDefaultValueFor & operator=(const RDefaultValueFor &)=delete
 
const std::type_info & GetTypeId() const final
 
ValuesPerSlot_t fLastResults
 
RDefaultValueFor(const RDefaultValueFor &)=delete
 
RDefaultValueFor & operator=(RDefaultValueFor &&)=delete
 
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.
 
T & GetValueOrDefault(unsigned int slot, Long64_t entry)
 
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")
 
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 e...
 
std::conditional_t< std::is_same< T, bool >::value, std::deque< T >, std::vector< T > > ValuesPerSlot_t
 
void MakeVariations(const std::vector< std::string > &variations) final
Create clones of this Define that work with values in varied "universes".
 
The head node of a RDF computation graph.
 
A binder for user-defined columns, variations and aliases.
 
This type represents a sample identifier, to be used in conjunction with RDataFrame features such as ...
 
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
 
RDFDetail::RColumnReaderBase * GetColumnReader(unsigned int slot, RColumnReaderBase *defineOrVariationReader, RLoopManager &lm, TTreeReader *treeReader, std::string_view colName, const std::type_info &ti)
 
std::vector< std::string > ColumnNames_t
 
ROOT type_traits extensions.
 
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
 
Lightweight storage for a collection of types.