I am interested in the possibility to create a RDataFrame without knowing in advance the number of entries.
So I would like to know wich is the constructor form.
Thank you in advance
Thank you for this suggestion.
I tried with the following declaration:
ROOT::RDataFrame test;
and it yields me the following error:
error: no matching function for call to ‘ROOT::RDataFrame::RDataFrame()’
In addition, I would be interested in the process to construct/insert values in the RDataFrame created this way.
To my knowledge both Define and Foreach automatically iterate on the nentries which are supposed to be known in advance.
Thanks
Thanks, creating RDataFrame test(0); works.
But I dont understand how to use command Fill, since it has not been created as a ttree.
Define and Foreach loop over 0 entries.
Ohh, I see, I was wrong. The Fill method is for filling eg a histogram from the already created RDataFrame.
I am not an expert on this class, but I think RDataFrame is just an interface to a TTree or another data source (CSV file, Numpy array, etc.). You need to “fill” the Datasource (ROOT: ROOT::RDF::RDataSource Class Reference), not the RDataFrame. @vpadulan might confirm.
the creation of a RDataFrame after
so I create two things and the first one is just to know how much is the second.
I hope there is a smarter way
Thank you anyway for your time
Bye
an RDataFrame is a class to analyze data stored in a TTree, or data stored in a CSV file.
It’s not a substitute of the TTree (or CSV file) itself. It’s not an “RDataSet”. It’s a tool (“a frame”) to analyze already stored data, not a tool to store (add) new data.