24 return rdf.
Histo1D({
"Histo2",
"Histogram running later", 10, 0, 20}, {
"x"});
29 auto histo = rdf.
Histo1D({
"Histo2",
"Histogram running later", 10, 0, 20}, {
"x"});
30 return histo.GetSharedPtr();
34void df039_RResultPtr_basics()
38 auto rdf = bare_rdf.
Define(
"x", [&](
unsigned long long entry) ->
unsigned int {
39 if (entry == 0) std::cout <<
"Event loop is running\n";
46 std::cout <<
"Declared histo1\n";
53 std::cout <<
"Declared histo2\n";
56 std::shared_ptr<TH1D> histo3 = histoNow(rNode);
57 std::cout <<
"Declared histo3\n";
RResultPtr<::TH1D > Histo1D(const TH1DModel &model={"", "", 128u, 0., 0.}, std::string_view vName="")
Fill and return a one-dimensional histogram with the values of a column (lazy action).
RInterface< Proxied > Define(std::string_view name, F expression, const ColumnNames_t &columns={})
Define a new column.
Smart pointer for the return type of actions.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
RInterface<::ROOT::Detail::RDF::RNodeBase > RNode
RNode AsRNode(NodeType node)
Cast a RDataFrame node to the common type ROOT::RDF::RNode.