Hello All,
I am trying to use an RDataFrame object to get histograms and I use the following lines:
auto h = dataFrame.Filter(selection.Data())
.Define(w_name.Data() , str_weight.Data())
.Define(var_name.Data(), branch_name.Data()) .Histo1D(ROOT::RDF::TH1DModel(*histogram.hist),var_name.Data(),w_name.Data());
After that, I want to add an extra selection to the filter and get another histogram. I do this like this:
auto h_perDSID = dataFrame.Filter(selection_perDSID.Data())
.Histo1D(ROOT::RDF::TH1DModel(*histogram.perDSIDHists[dsid]), var_name.Data(), w_name.Data());
But when I do that I get these errors:
what(): Unknown columns: $$var_name.Data(), w_name.Data()$$
and if I try to Define them as with the first call I get a Redefinition error…
I’m a bit confused because it says that the column is not found but when I try to define them it says I’m trying to redefine it.
Anyone has some ideas?
Thanks!
Sergio