21#include <Monitoring/Monitoring.h>
22#include <ROOT/RDataFrame.hxx>
23#include <ROOT/RArrowDS.hxx>
34 "rdataframe_producer",
50 ROOT::RDataFrame rdf(100);
51 auto t = rdf.Define(
"x",
"1.f")
54 t.ForeachSlot(out->persist<
float,
float>({
"x",
"z"}), {
"x",
"z"});
58 "rdataframe_consumer",
74 auto table = s->asArrowTable();
75 if (table->num_rows() != 100) {
76 LOG(error) <<
"Wrong number of entries for the arrow table" << table->num_rows();
79 if (table->num_columns() != 2) {
80 LOG(error) <<
"Wrong number of columns for the arrow table" << table->num_columns();
83 auto source = std::make_unique<ROOT::RDF::RArrowDS>(s->asArrowTable(), std::vector<std::string>{});
84 ROOT::RDataFrame rdf(std::move(
source));
86 if (*rdf.Count() != 100) {
87 LOG(error) <<
"Wrong number of entries for the DataFrame" << *rdf.Count();
90 if (*rdf.Mean(
"z") - 3.f > 0.1f) {
91 LOG(error) <<
"Wrong average for z";
void readyToQuit(bool all)
Compatibility with old API.
decltype(auto) make(const Output &spec, Args... args)
GLsizei GLsizei GLchar * source
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs
WorkflowSpec defineDataProcessing(ConfigContext const &)
Example of how to use ROOT::RDataFrame using DPL.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"