11#ifndef ROOT_RDF_RDEFINE 
   12#define ROOT_RDF_RDEFINE 
   38namespace ExtraArgsForDefine {
 
 
   45template <
typename F, 
typename ExtraArgsTag = ExtraArgsForDefine::None>
 
   57   using TypeInd_t = std::make_index_sequence<ColumnTypes_t::list_size>;
 
   61      std::conditional_t<std::is_same<ret_type, bool>::value, std::deque<ret_type>, std::vector<ret_type>>;
 
   67   std::vector<std::array<RColumnReaderBase *, ColumnTypes_t::list_size>> 
fValues;
 
   71   std::unordered_map<std::string, std::unique_ptr<RDefineBase>> 
fVariedDefines;
 
   73   template <
typename ColType>
 
   79      throw std::out_of_range{
"RDataFrame: Define could not retrieve value for column '" + fColumnNames[
readerIdx] +
 
   80                              "' for entry " + std::to_string(
entry) +
 
   81                              ". You can use the DefaultValueFor operation to provide a default value, or " 
   82                              "FilterAvailable/FilterMissing to discard/keep entries with missing values instead."};
 
 
   85   template <
typename... 
ColTypes, std::size_t... S>
 
   88      fLastResults[
slot * RDFInternal::CacheLineStep<ret_type>()] =
 
 
   93   template <
typename... 
ColTypes, std::size_t... S>
 
   96      fLastResults[
slot * RDFInternal::CacheLineStep<ret_type>()] =
 
 
  101   template <
typename... 
ColTypes, std::size_t... S>
 
  105      fLastResults[
slot * RDFInternal::CacheLineStep<ret_type>()] =
 
 
  116      fLoopManager->Register(
this);
 
 
  127      fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()] = -1;
 
 
  133      return static_cast<void *
>(&fLastResults[
slot * RDFInternal::CacheLineStep<ret_type>()]);
 
 
  139      if (
entry != fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()]) {
 
  142         fLastCheckedEntry[
slot * RDFInternal::CacheLineStep<Long64_t>()] = 
entry;
 
 
  153      fValues[
slot].fill(
nullptr);
 
  155      for (
auto &
e : fVariedDefines)
 
  156         e.second->FinalizeSlot(
slot);
 
 
  162      for (
const auto &
variation : variations) {
 
  163         if (std::find(fVariationDeps.begin(), fVariationDeps.end(), 
variation) == fVariationDeps.end()) {
 
  167         if (fVariedDefines.find(
variation) != fVariedDefines.end())
 
  173            new RDefine(fName, fType, fExpression, fColumnNames, fColRegister, *fLoopManager, 
variation));
 
 
  183      if (it == fVariedDefines.end()) {
 
  186         assert(std::find(fVariationDeps.begin(), fVariationDeps.end(), 
variationName) == fVariationDeps.end());
 
  190      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 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
 
auto GetValueChecked(unsigned int slot, std::size_t readerIdx, Long64_t entry) -> ColType &
 
std::conditional_t< std::is_same< ret_type, bool >::value, std::deque< ret_type >, std::vector< ret_type > > ValuesPerSlot_t
 
RDefine(const RDefine &)=delete
 
void UpdateHelper(unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, SlotAndEntryTag)
 
void * GetValuePtr(unsigned int slot) final
Return the (type-erased) address of the Define'd value for the given processing slot.
 
void InitSlot(TTreeReader *r, unsigned int slot) final
 
RDFInternal::RemoveFirstParameterIf_t< std::is_same< ExtraArgsTag, SlotTag >::value, FunParamTypes_t > ColumnTypesTmp_t
 
void MakeVariations(const std::vector< std::string > &variations) final
Create clones of this Define that work with values in varied "universes".
 
RDefineBase & GetVariedDefine(const std::string &variationName) final
Return a clone of this Define that works with values in the variationName "universe".
 
ValuesPerSlot_t fLastResults
 
RDefine(std::string_view name, std::string_view type, F expression, const ROOT::RDF::ColumnNames_t &columns, const RDFInternal::RColumnRegister &colRegister, RLoopManager &lm, const std::string &variationName="nominal")
 
typename CallableTraits< F >::ret_type ret_type
 
std::make_index_sequence< ColumnTypes_t::list_size > TypeInd_t
 
const std::type_info & GetTypeId() const final
 
RDefine & operator=(const RDefine &)=delete
 
typename CallableTraits< F >::arg_types FunParamTypes_t
 
void FinalizeSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
 
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.
 
void UpdateHelper(unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, SlotTag)
 
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::vector< std::array< RColumnReaderBase *, ColumnTypes_t::list_size > > fValues
Column readers per slot and per input column.
 
RDFInternal::RemoveFirstTwoParametersIf_t< std::is_same< ExtraArgsTag, SlotAndEntryTag >::value, ColumnTypesTmp_t > ColumnTypes_t
 
std::unordered_map< std::string, std::unique_ptr< RDefineBase > > fVariedDefines
Define objects corresponding to systematic variations other than nominal for this defined column.
 
void UpdateHelper(unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, NoneTag)
 
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,...
 
typename RemoveFirstTwoParametersIf< MustRemove, TypeList >::type RemoveFirstTwoParametersIf_t
 
typename RemoveFirstParameterIf< MustRemove, TypeList >::type RemoveFirstParameterIf_t
 
std::array< RDFDetail::RColumnReaderBase *, sizeof...(ColTypes)> GetColumnReaders(unsigned int slot, TTreeReader *treeReader, TypeList< ColTypes... >, const RColumnReadersInfo &colInfo, const std::string &variationName="nominal")
Create a group of column readers, one per type in the parameter pack.
 
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...
 
Extract types from the signature of a callable object. See CallableTraits.
 
This type aggregates some of the arguments passed to GetColumnReaders.