Creating RDataframe with Column values of type RVec reading data from external file

Running that logic in the lambda should be exactly the same as running it outside (I assume you are not using ROOT::EnableImplicitMT(), because that code is not thread-safe and cannot be run in a multi-thread event loop).

Ah, wait! You are calling inFile.Close() too soon. RDataFrame is lazy, it doesn’t actually compute the Defines until you call Snapshot!