GraphAsymmErrors not working with RDataFrame?

Dear Developers,
The documentation says a TGraphAsymmErrors can be made from an RDataFrame. However, this seems not possible:

root [0] ROOT::RDataFrame df("ntuple","hsimple.root");
root [1] TGraphAsymmErrors *g = df.GraphAsymmErrors("px", "py","random","random","random","random");
ROOT_prompt_1:1:27: error: no member named 'GraphAsymmErrors' in 'ROOT::RDataFrame'
TGraphAsymmErrors *g = df.GraphAsymmErrors("px", "py","random","random","random","random");
                       ~~ ^
root [2]

I tried this on Ubuntu 20.04 over WSL, with the latest ROOT version (6.26/10) as well as a few other previous ROOT 6 versions, and saw the same in all. Is this a known issue? or am I doing something incorrectly?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

I guess @eguiraud can help.

Hi @dastudillo ,

sorry for the high latency (Christmas break). The error is really weird, for some reason the interpreter gets very confused. But the problem seems to be with the return type (like all RDF actions, GraphAsymmErrors returns a RResultPtr – in this case a RResultPtr as per the docs you linked.

This should work:

root [0] ROOT::RDataFrame df("ntuple","hsimple.root");
root [1] auto g = df.GraphAsymmErrors("px", "py","random","random","random","random")
(ROOT::RDF::RResultPtr<TGraphAsymmErrors> &) @0x7f49d496d000

Cheers,
Enrico

Hi @eguiraud ,
Thanks for having a look. Did you use another version of ROOT? For me, with the same ROOT version as before (6.26/10) on WSL, and now also tried directly on Ubuntu 22.04 on another machine, it does not work with auto either:

root [0] ROOT::RDataFrame df("ntuple","hsimple.root");
root [1] auto g = df.GraphAsymmErrors("px", "py","random","random","random","random")
ROOT_prompt_1:1:13: error: no member named 'GraphAsymmErrors' in 'ROOT::RDataFrame'
auto g = df.GraphAsymmErrors("px", "py","random","random","random","random")
         ~~ ^
root [2]

Ah indeed, it’s a v6.28/master branch feature, you can see it’s not present in the v6.26 reference guide: ROOT: ROOT Reference Documentation . I thought it was already there, sorry!

6.28 will be released soon (O(weeks)). In the meanwhile you can use Fill to fill a custom object as long as it has a Fill and a Merge method with the correct signature.

Cheers,
Enrico

1 Like

This topic was automatically closed after 10 days. New replies are no longer allowed.