The following works as expected.
ROOT::RDF::TH2DModel mh2D("h2D", "his2D", 100, 0., 100, 100, 0., 100);
auto h2D = matdf.Histo2D(mh2D, "X", "Y");
h2D->Draw("colz");
However, when I do the following i.e. when I use GetValue()
before the Draw()
ROOT::RDF::TH2DModel mh2D("h2D", "his2D", 100, 0., 100, 100, 0., 100);
auto h2D = matdf.Histo2D(mh2D, "X", "Y").GetValue();
h2D->Draw("colz");
I get the following error
error: member reference type 'TH2D' is not a pointer;
Please explain why?
ROOT Version: ROOT 6.24/02
Platform: Linux 5.17.12-100.fc34.x86_64
Compiler: 11.3.1 20220421