Hi,
I am trying to read through a root file in a RDataFrame inside python. The tree has elements belonging to a template class (template class TStoreGEMData) but i can’t figure out how to access them inside the data frame.
lyA_Power_data=ROOT.RDataFrame("feGEM/121_Laser\\PMT_integral","../2022_Laser_cooling_ROOT_files/output65661.root")
lyA_Power_data= lyA_Power_data.Define("runnumber", "TStoreGEMData<double>.GetRunNumber()")
AbortSignal Traceback (most recent call last)
Cell In [2], line 2
1 lyA_Power_data=ROOT.RDataFrame("feGEM/121_Laser\\PMT_integral","../2022_Laser_cooling_ROOT_files/output65661.root")
----> 2 lyA_Power_data= lyA_Power_data.Define("runnumber", "TStoreGEMData<double>.GetRunNumber()")
AbortSignal: Template method resolution failed:
ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void> ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Define(basic_string_view<char,char_traits<char> > name, basic_string_view<char,char_traits<char> > expression) =>
AbortSignal: abort from C++; program state was reset
input_line_135:2:49: error: expected '(' for function-style cast or type construction
auto lambda0 = [](){return TStoreGEMData<double>.GetRunNumber()
~~~~~~~~~~~~~~~~~~~~~^
libc++abi: terminating with uncaught exception of type std::runtime_error:
RDataFrame: An error occurred during just-in-time compilation. The lines above might indicate the cause of the crash
All RDF objects that have not run an event loop yet should be considered in an invalid state.
*** Break *** abort
The root tree has the following elements:
print(lyA_Power_data.GetColumnNames() )
{ "DataEndianness", "MIDASTime", "RawLabVIEWAsUNIXTime", "RawLabVIEWtimestamp", "RawLabVIEWtimestamp.Seconds", "RawLabVIEWtimestamp.SubSecondFraction", "RawLabVIEWtimestamp.TObject", "RawLabVIEWtimestamp.fBits", "RawLabVIEWtimestamp.fUniqueID", "RunTime", "TObject", "TStoreGEMData<double>", "TStoreGEMData<double>.DataEndianness", "TStoreGEMData<double>.MIDASTime", "TStoreGEMData<double>.RawLabVIEWAsUNIXTime", "TStoreGEMData<double>.RawLabVIEWtimestamp", "TStoreGEMData<double>.RawLabVIEWtimestamp.Seconds", "TStoreGEMData<double>.RawLabVIEWtimestamp.SubSecondFraction", "TStoreGEMData<double>.RawLabVIEWtimestamp.TObject", "TStoreGEMData<double>.RawLabVIEWtimestamp.fBits", "TStoreGEMData<double>.RawLabVIEWtimestamp.fUniqueID", "TStoreGEMData<double>.RunTime", "TStoreGEMData<double>.TObject", "TStoreGEMData<double>.TimestampEndianness", "TStoreGEMData<double>.data", "TStoreGEMData<double>.fBits", "TStoreGEMData<double>.fUniqueID", "TStoreGEMData<double>.runNumber", "TimestampEndianness", "data", "fBits", "fUniqueID", "runNumber" }
_ROOT Version: JupyROOT 6.26/06
_Platform:
_Compiler: Apple clang version 13.1.6 (clang-1316.0.21.2.5)