DPL Analysis: Filling histograms in registry with expressions#4433
DPL Analysis: Filling histograms in registry with expressions#4433ktf merged 4 commits intoAliceO2Group:devfrom
Conversation
|
Very nice. How difficult would it be to use |
| { | ||
| auto filtered = o2::soa::Filtered<T>{{table.asArrowTable()}, o2::framework::expressions::createSelection(table.asArrowTable(), filter)}; | ||
| for (auto& t : filtered) { | ||
| hist->Fill(*(static_cast<C>(t).getIterator())); |
There was a problem hiding this comment.
It may be more efficient to use FillN method of ROOT histogram, that allows to fill it from an array
There was a problem hiding this comment.
Ok, do I see well there is no FillN() for TH3?
There was a problem hiding this comment.
Not sure how it is implemented for dimensions > 1, I'll have to check. For 1-dimensional you can pass nullptr for the weights.
@ktf We would need still to copy filtered rows, and so iterate. There is no actual filtered table. |
|
True for filtered tables, but not for unfiltered ones, though. That said, we could also try to suggest ROOT folks an extension. |
Hm, but using expressions by principle creates filtered views ('tables')? ROOT has RDataFrame that enables to filter and draw the data - but with filter from lambda / string. |
|
Yes, I know. I wrote the arrow integration for RDataFrame... ;-) I meant that we could extend FillN to take a bitmap / selection vector for what to fill. |
|
Anyways, this is already very good. Let's merge this and continue the discussion on how to extend it. |
hah, ok ;-) |
No description provided.