#include #include #include void test() { auto fileName = "test.root"; auto treeName = "tree"; auto c = new TCanvas(); c->Print("test.pdf[", "pdf"); ROOT::RDataFrame df(treeName, fileName); auto h1 = df.Histo1D({"x", "x", 400, 0, 40}, {"x"}); auto h2 = df.Define("x2", [](double x) { return 2 * x; }, {"x"}) .Histo1D({"x2", "x2", 400, 0, 40}, {"x2"}); std::cout << "foofoofoo" << std::endl; h1->Draw(); h2->SetLineColor(kRed); h2->Draw("same"); std::cout << "barbarbar" << std::endl; c->Print("test.pdf", "pdf"); c->Print("test.pdf]", "pdf"); // return 0; }