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

Classes

class  ProgressBarAction
 
class  ProgressHelper
 RDF progress helper. More...
 
class  RDatasetSpec
 The dataset specification for RDataFrame. More...
 
class  RMetaData
 Class behaving as a heterogenuous dictionary to store the metadata of a dataset. More...
 
class  RResultMap
 
class  RSample
 Class representing a sample which is a grouping of trees and their fileglobs, and, optionally, the sample's metadata information via the RMetaData object. More...
 

Typedefs

using SnapshotPtr_t = ROOT::RDF::RResultPtr< ROOT::RDF::RInterface< ROOT::Detail::RDF::RLoopManager, void > >
 

Functions

void AddProgressBar (ROOT::RDataFrame df)
 Add ProgressBar to an RDataFrame.
 
void AddProgressBar (ROOT::RDF::RNode df)
 Add ProgressBar to a ROOT::RDF::RNode.
 
RDataFrame FromRNTuple (ROOT::Experimental::RNTuple *ntuple)
 
RDataFrame FromRNTuple (std::string_view ntupleName, const std::vector< std::string > &fileNames)
 
RDataFrame FromRNTuple (std::string_view ntupleName, std::string_view fileName)
 
ROOT::RDataFrame FromSpec (const std::string &jsonFile)
 Factory method to create an RDataFrame from a JSON specification file.
 
template<typename T >
RResultMap< T > VariationsFor (RResultPtr< T > resPtr)
 Produce all required systematic variations for the given result.
 
SnapshotPtr_t VariationsFor (SnapshotPtr_t resPtr)
 

Typedef Documentation

◆ SnapshotPtr_t

Function Documentation

◆ AddProgressBar() [1/2]

void ROOT::RDF::Experimental::AddProgressBar ( ROOT::RDataFrame  df)

Add ProgressBar to an RDataFrame.

Parameters
[in]dfRDataFrame for which ProgressBar is called.

This function adds a ProgressBar to display the event statistics in the terminal every m events and every n seconds, including elapsed time, currently processed file, currently processed events, the rate of event processing and an estimated remaining time (per file being processed). ProgressBar should be added after the dataframe object (df) is created first:

ROOT::RDataFrame df("tree", "file.root");
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
void AddProgressBar(ROOT::RDF::RNode df)
Add ProgressBar to a ROOT::RDF::RNode.

For more details see ROOT::RDF::Experimental::ProgressHelper Class.

Definition at line 382 of file RDFHelpers.cxx.

◆ AddProgressBar() [2/2]

void ROOT::RDF::Experimental::AddProgressBar ( ROOT::RDF::RNode  df)

Add ProgressBar to a ROOT::RDF::RNode.

Parameters
[in]dfRDataFrame node at which ProgressBar is called.

The ProgressBar can be added not only at the RDataFrame head node, but also at any any computational node, such as Filter or Define.

Example usage:

ROOT::RDataFrame df("tree", "file.root");
auto df_1 = ROOT::RDF::RNode(df.Filter("x>1"));
RInterface<::ROOT::Detail::RDF::RNodeBase, void > RNode

Definition at line 373 of file RDFHelpers.cxx.

◆ FromRNTuple() [1/3]

ROOT::RDataFrame ROOT::RDF::Experimental::FromRNTuple ( ROOT::Experimental::RNTuple ntuple)

Definition at line 663 of file RNTupleDS.cxx.

◆ FromRNTuple() [2/3]

ROOT::RDataFrame ROOT::RDF::Experimental::FromRNTuple ( std::string_view  ntupleName,
const std::vector< std::string > &  fileNames 
)

Definition at line 658 of file RNTupleDS.cxx.

◆ FromRNTuple() [3/3]

ROOT::RDataFrame ROOT::RDF::Experimental::FromRNTuple ( std::string_view  ntupleName,
std::string_view  fileName 
)

Definition at line 652 of file RNTupleDS.cxx.

◆ FromSpec()

ROOT::RDataFrame ROOT::RDF::Experimental::FromSpec ( const std::string &  jsonFile)

Factory method to create an RDataFrame from a JSON specification file.

Create the RDataFrame from the dataset specification file.

Parameters
[in]jsonFilePath of the JSON file, which should follow the format described in https://github.com/root-project/root/issues/11624
[in]jsonFilePath to the dataset specification JSON file.

The input dataset specification JSON file must include a number of keys that describe all the necessary samples and their associated metadata information. The main key, "samples", is required and at least one sample is needed. Each sample must have at least one key "trees" and at least one key "files" from which the data is read. Optionally, one or more metadata information can be added, as well as the friend list information.

Example specification file JSON:

The following is an example of the dataset specification JSON file formatting:

{
"samples": {
"sampleA": {
"trees": ["tree1", "tree2"],
"files": ["file1.root", "file2.root"],
"metadata": {"lumi": 1.0, }
},
"sampleB": {
"trees": ["tree3", "tree4"],
"files": ["file3.root", "file4.root"],
"metadata": {"lumi": 0.5, }
},
...
},
}

Definition at line 1701 of file RDataFrame.cxx.

◆ VariationsFor() [1/2]

template<typename T >
RResultMap< T > ROOT::RDF::Experimental::VariationsFor ( RResultPtr< T >  resPtr)

Produce all required systematic variations for the given result.

Parameters
[in]resPtrThe result for which variations should be produced.
Returns
A RResultMap object with full variation names as strings (e.g. "pt:down") and the corresponding varied results as values.

A given input RResultPtr<T> produces a corresponding RResultMap<T> with a "nominal" key that will return a value identical to the one contained in the original RResultPtr. Other keys correspond to the varied values of this result, one for each variation that the result depends on. VariationsFor does not trigger the event loop. The event loop is only triggered upon first access to a valid key, similarly to what happens with RResultPtr.

If the result does not depend, directly or indirectly, from any registered systematic variation, the returned RResultMap will contain only the "nominal" key.

See RDataFrame's Vary method for more information and example usages.

Note
Currently, producing variations for the results of Display, Report and Snapshot actions is not supported.

Definition at line 219 of file RDFHelpers.hxx.

◆ VariationsFor() [2/2]

ROOT::RDF::Experimental::SnapshotPtr_t ROOT::RDF::Experimental::VariationsFor ( SnapshotPtr_t  resPtr)

Definition at line 135 of file RDFHelpers.cxx.