I mentioned this a few days ago in person, but I thought I should write it down as well.
I recently started playing with ROOT::RDataFrame, taking the code developed by Umesh Dharmaji Worlikar, and trying to make it a bit sleeker. You can find the code I'm working on over here:
While trying to find the limits of the data frame code, I found that it's not really aware that columns held in the data frame may have "some inheritance".
In ATLAS our EDM has some convenient features. One of them is that all our particle container types (like xAOD::ElectronContainer) inherit from xAOD::IParticleContainer. Allowing us to write "generic code" that would work with electrons, muons, etc.
Unfortunately RDataFrame doesn't allow for this at the moment. Look at
Note that the xAOD data source can absolutely serve the "Electrons" branch as both xAOD::IParticleContainer or xAOD::ElectronContainer. But as soon as I try to use the same branch as both, I get:
For us it would certainly be very desirable to add support for this sort of a thing. As it would allow us to provide common functors for analyses (for example).
P.S. It's also not clear to me what ROOT::RDF::RDataSource::GetTypeName(...) is used for at the moment... My data source returns the type of the concrete object. (Of course.) But it doesn't stop RDataFrame from using the object as xAOD::IParticleContainer. And I don't really understand why/how...