RDataFrame Snapshot leaf list

Hi,

I do not know how to control the list of leafs that should be stored in
a Snapshot and more importantly filling a DataFrame with a snapshot
gives access to the wrong column.

In my test case, a csv file is parsed and the columns “fTicket” and “fCount”
are created. Next this tdf is processed and a column “data” is added that
contains structure elements data.fSYear, data.fEYear and data.fCount
(notice the duplication of the name).

(The column names are retrieved and it contains twice “fTicket” which is
not understood but not relevant for the real issue.)

A snapshot is made for just the column “fCount”. Retrieving it later
and summing it up gives the correct result. Also a snapshot is made
of all columns. After its retrieval and summing over the “fCount” column,
I find that actually “data.fCount” was summed.

Now the question is how can I distinguish between the “fCount” and
“data.fCount” columns ?

-Eddy
mytest.C (2.5 KB) ticket2.txt (85 Bytes)
_ROOT Version: 6.20.02
_Platform: MacOSX
Compiler: Not Provided


@eguiraud can you help?

Hi Eddy,
this is a bug in Snapshot: the fCount branch in the second Snapshot actually contains the values that should be in data.fCount. An easy workaround is to change the name of TData::fCount to something else so there is no ambiguity.

I created ROOT-10702 with a self-contained reproducer. I will try to debug and fix at the very latest before the end of next week.

Cheers,
Enrico

Hi Enrico,
Thank you for taking the time digging through code from others :grimacing:. In the mean time, I changed the data member names so that the ambiguity is removed. My bigger code is now running and exactly reproducing the one based on TTree at al.

What would be the appropriate place on this forum to request a new feature and to submit experience of using something in ROOT ?

-Eddy

Hi,
good, I’d say Jira for requesting features, forum post for general feedback!

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