Usage of RResultPtr.
This tutorial illustrates what is the difference between lazy and immediate results and how to use either of them in RDataFrame. "Lazy" or deferred results are only produced once they are accessed. This allows for declaring multiple desired results, and producing them in a single run of the event loop.
#include <iostream>
return rdf.Histo1D({
"Histo2",
"Histogram running later", 10, 0, 20}, {
"x"});
}
auto histo =
rdf.Histo1D({
"Histo2",
"Histogram running later", 10, 0, 20}, {
"x"});
return histo.GetSharedPtr();
}
{
if (
entry == 0) std::cout <<
"Event loop is running\n";
}, {"rdfentry_"});
std::cout << "Declared histo1\n";
std::cout << "Declared histo2\n";
std::cout << "Declared histo3\n";
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The public interface to the RDataFrame federation of classes.
Smart pointer for the return type of actions.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
RNode AsRNode(NodeType node)
Cast a RDataFrame node to the common type ROOT::RDF::RNode.
Declared histo1
Declared histo2
Event loop is running
Declared histo3
- Date
- 2025
- Author
- Stephan Hageboeck (CERN)
Definition in file df039_RResultPtr_basics.C.