Hi,
I am trying to read Delphes trees (with split TClonesArrays) in RDataFrame with JITting, so I think my problem is the JITted version of
This fails:
In [7]: df.Define("leadElPT", "Electron[0].PT")
input_line_70:2:53: error: member reference type 'TObject *' is a pointer; did you mean to use '->'?
auto lambda0 = [](TClonesArray& var0){return var0[0].PT
~~~~~~~^
->
input_line_70:2:54: error: no member named 'PT' in 'TObject'
auto lambda0 = [](TClonesArray& var0){return var0[0].PT
~~~~~~~ ^
input_line_74:2:53: error: member reference type 'TObject *' is a pointer; did you mean to use '->'?
auto lambda0 = [](TClonesArray& var0){return var0[0].PT
~~~~~~~^
->
input_line_74:2:54: error: no member named 'PT' in 'TObject'
auto lambda0 = [](TClonesArray& var0){return var0[0].PT
~~~~~~~ ^
---------------------------------------------------------------------------
(very similar errors with Electron[0]->PT
, then it’s just the missing attributes instead of .
for a pointer).
This works, but it’s a bit cumbersome…
ROOT.gInterpreter.Declare("using delphes_electron = Electron;")
df.Define("leadElPT", "dynamic_cast<delphes_electron*>(Electron[0])->PT")
If there’s an easy way to define RVec<Electron>
or RVec<Electron*>
columns that’s probably good enough as a workaround, but my first attempts to find something for that failed.
Do you have any suggestions?
Thanks,
Pieter
ROOT Version: 6.24/00
Platform: LCG_100 (x86_64-centos7-gcc10-opt) on lxplus
Compiler: GCC 10