Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Detail::RDF Namespace Reference

Namespaces

namespace  ExtraArgsForDefine
 

Classes

class  RActionImpl
 Base class for action helpers, see RInterface::Book() for more information. More...
 
struct  RCallCleanUpTask
 A RAII object that calls RLoopManager::CleanUpTask at destruction. More...
 
class  RColumnReaderBase
 
class  RDefine
 
class  RDefineBase
 
class  RDefinePerSample
 
class  RFilter
 
class  RFilterBase
 
struct  RInferredType
 
class  RJittedDefine
 A wrapper around a concrete RDefine, which forwards all calls to it RJittedDefine is a placeholder that is put in the collection of custom columns in place of a RDefine that will be just-in-time compiled. More...
 
class  RJittedFilter
 A wrapper around a concrete RFilter, which forwards all calls to it RJittedFilter is the type of the node returned by jitted Filter calls: the concrete filter can be created and set at a later time, from jitted code. More...
 
class  RLoopManager
 The head node of a RDF computation graph. More...
 
class  RMergeableCount
 Specialization of RMergeableValue for the Count action. More...
 
class  RMergeableFill
 Specialization of RMergeableValue for histograms and statistics. More...
 
class  RMergeableMax
 
class  RMergeableMean
 Specialization of RMergeableValue for the Mean action. More...
 
class  RMergeableMin
 
class  RMergeableStdDev
 Specialization of RMergeableValue for the StdDev action. More...
 
class  RMergeableSum
 
class  RMergeableValue
 A result of an RDataFrame execution, that knows how to merge with other results of the same type. More...
 
class  RMergeableValueBase
 Base class of RMergeableValue. More...
 
class  RMergeableVariations
 A container for variation names and variation results that knows how to merge with others of the same type. More...
 
class  RMergeableVariationsBase
 A container for variation names and variation results. More...
 
class  RNodeBase
 Base class for non-leaf nodes of the computational graph. More...
 
class  RRange
 
class  RRangeBase
 

Functions

template<typename T >
std::unique_ptr< RMergeableVariations< T > > GetMergeableValue (ROOT::RDF::Experimental::RResultMap< T > &rmap)
 Retrieve mergeable values after calling ROOT::RDF::VariationsFor .
 
template<typename T >
std::unique_ptr< RMergeableValue< T > > GetMergeableValue (RResultPtr< T > &rptr)
 Retrieve a mergeable value from an RDataFrame action.
 
template<typename T >
RResultPtr< T > MakeResultPtr (const std::shared_ptr< T > &r, RLoopManager &lm, std::shared_ptr< RDFInternal::RActionBase > actionPtr)
 Create a RResultPtr and set its pointer to the corresponding RAction This overload is invoked by non-jitted actions, as they have access to RAction before constructing RResultPtr.
 
template<typename T , typename... Ts>
void MergeValues (RMergeableValue< T > &OutputMergeable, const RMergeableValue< Ts > &... InputMergeables)
 Merge multiple RMergeableValue objects into one.
 
template<typename T , typename... Ts>
void MergeValues (RMergeableVariations< T > &OutputMergeable, const RMergeableVariations< Ts > &... InputMergeables)
 Merge multiple RMergeableVariations objects into one.
 
template<typename T , typename... Ts>
std::unique_ptr< RMergeableValue< T > > MergeValues (std::unique_ptr< RMergeableValue< T > > OutputMergeable, std::unique_ptr< RMergeableValue< Ts > >... InputMergeables)
 Merge multiple RMergeableValue objects into one.
 
ROOT::Experimental::RLogChannelRDFLogChannel ()
 

Function Documentation

◆ GetMergeableValue() [1/2]

template<typename T >
std::unique_ptr< RMergeableVariations< T > > ROOT::Detail::RDF::GetMergeableValue ( ROOT::RDF::Experimental::RResultMap< T > &  rmap)

Retrieve mergeable values after calling ROOT::RDF::VariationsFor .

Parameters
[in]rmaplvalue reference of an RResultMap object.
Returns
A container with the variation names and then variation values.

This function triggers the execution of the RDataFrame computation graph. Then retrieves an RMergeableVariations object created with the results held by the RResultMap input. The user obtains ownership of the mergeable, which in turn holds a copy variation names and variation results. The RResultMap is not destroyed in the process and will still retain (shared) ownership of the original results.

Example usage:

auto df = ROOT::RDataFrame(10).Define("x", [] { return 1; });
auto h = df.Vary("x", [](){return ROOT::RVecI{-1, 2};}, {}, 2).Histo1D<int>("x");
std::unique_ptr<RMergeableVariations<T>> m = ROOT::Detail::RDF::GetMergeableValue(hs);
#define h(i)
Definition RSha256.hxx:106
RInterface< Proxied, DS_t > Define(std::string_view name, F expression, const ColumnNames_t &columns={})
Define a new column.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
std::unique_ptr< RMergeableVariations< T > > GetMergeableValue(ROOT::RDF::Experimental::RResultMap< T > &rmap)
Retrieve mergeable values after calling ROOT::RDF::VariationsFor .
RResultMap< T > VariationsFor(RResultPtr< T > resPtr)
Produce all required systematic variations for the given result.
TMarker m
Definition textangle.C:8

Definition at line 174 of file RResultMap.hxx.

◆ GetMergeableValue() [2/2]

template<typename T >
std::unique_ptr< RMergeableValue< T > > ROOT::Detail::RDF::GetMergeableValue ( RResultPtr< T > &  rptr)

Retrieve a mergeable value from an RDataFrame action.

Parameters
[in]rptrlvalue reference of an RResultPtr object.
Returns
An RMergeableValue holding the result of the action, wrapped in an std::unique_ptr.

This function triggers the execution of the RDataFrame computation graph. Then retrieves an RMergeableValue object created with the result wrapped by the RResultPtr argument. The user obtains ownership of the mergeable, which in turn holds a copy of the result of the action. The RResultPtr is not destroyed in the process and will still retain (shared) ownership of the original result.

Example usage:

using namespace ROOT::Detail::RDF;
ROOT::RDataFrame d("myTree", "file_*.root");
auto h = d.Histo1D("Branch_A");
auto mergeablehisto = GetMergeableValue(h);
#define d(i)
Definition RSha256.hxx:102

Definition at line 435 of file RResultPtr.hxx.

◆ MakeResultPtr()

template<typename T >
RResultPtr< T > ROOT::Detail::RDF::MakeResultPtr ( const std::shared_ptr< T > &  r,
RLoopManager df,
std::shared_ptr< ROOT::Internal::RDF::RActionBase actionPtr 
)

Create a RResultPtr and set its pointer to the corresponding RAction This overload is invoked by non-jitted actions, as they have access to RAction before constructing RResultPtr.

Definition at line 409 of file RResultPtr.hxx.

◆ MergeValues() [1/3]

template<typename T , typename... Ts>
void ROOT::Detail::RDF::MergeValues ( RMergeableValue< T > &  OutputMergeable,
const RMergeableValue< Ts > &...  InputMergeables 
)

Merge multiple RMergeableValue objects into one.

Parameters
[in,out]OutputMergeableThe mergeable object where all the information will be aggregated.
[in]InputMergeablesOther mergeables containing the partial results.

This overload modifies the mergeable objects in-place. The ownership is left to the caller. The first argument to the function will get all the values contained in the other arguments merged into itself. This is a convenience overload introduced for the ROOT Python API.

Example usage:

// mh1, mh2, mh3 are std::unique_ptr<RMergeableValue<TH1D>>
const auto &mergedhisto = mh1->GetValue(); // Final merged histogram
// Do stuff with it
mergedhisto.Draw();
std::unique_ptr< RMergeableValue< T > > MergeValues(std::unique_ptr< RMergeableValue< T > > OutputMergeable, std::unique_ptr< RMergeableValue< Ts > >... InputMergeables)
Merge multiple RMergeableValue objects into one.

Definition at line 761 of file RMergeableValue.hxx.

◆ MergeValues() [2/3]

template<typename T , typename... Ts>
void ROOT::Detail::RDF::MergeValues ( RMergeableVariations< T > &  OutputMergeable,
const RMergeableVariations< Ts > &...  InputMergeables 
)

Merge multiple RMergeableVariations objects into one.

Parameters
[in,out]OutputMergeableThe mergeable object where all the information will be aggregated.
[in]InputMergeablesOther mergeables containing the partial results.

This overload modifies the mergeable objects in-place. The ownership is left to the caller. The first argument to the function will get all the values contained in the other arguments merged into itself. This is a convenience overload introduced for the ROOT Python API.

Example usage:

// mv1, mv2 are std::unique_ptr<RMergeableVariations<TH1D>>
const auto &keys = mv1->GetKeys(); // Names of the variations
// Do stuff with the variations
for(const auto &key: keys){
const auto &histo = mv1->GetVariation(key); // Varied histogram
std::cout << histo.GetEntries() << "\n";
}

Definition at line 795 of file RMergeableValue.hxx.

◆ MergeValues() [3/3]

template<typename T , typename... Ts>
std::unique_ptr< RMergeableValue< T > > ROOT::Detail::RDF::MergeValues ( std::unique_ptr< RMergeableValue< T > >  OutputMergeable,
std::unique_ptr< RMergeableValue< Ts > >...  InputMergeables 
)

Merge multiple RMergeableValue objects into one.

Parameters
[in]OutputMergeableThe mergeable object where all the information will be aggregated.
[in]InputMergeablesOther mergeables containing the partial results.
Returns
An RMergeableValue holding the aggregated value wrapped in an std::unique_ptr.

This is the recommended way of merging multiple RMergeableValue objects. This overload takes ownership of the mergeables and gives back to the user a mergeable with the aggregated information. All the mergeables with the partial results get destroyed in the process.

Example usage:

using namespace ROOT::Detail::RDF;
// mh1, mh2, mh3 are std::unique_ptr<RMergeableValue<TH1D>>
auto mergedptr = MergeValues(std::move(mh1), std::move(mh2), std::move(mh3));
const auto &mergedhisto = mergedptr->GetValue(); // Final merged histogram
// Do stuff with it
mergedhisto.Draw();

Definition at line 727 of file RMergeableValue.hxx.

◆ RDFLogChannel()

ROOT::Experimental::RLogChannel & ROOT::Detail::RDF::RDFLogChannel ( )

Definition at line 37 of file RDFUtils.cxx.