I’m wondering if there is a way to get the name of the file for which a specific entry in an RDF belongs to. If I create an RDF adding several files together I want to be able to get the filename of this event. E.g. to be used with the DefinePerSample(), where I want to use different numbers depending on the file I process.
nice to see you on the forum and thank you for the question.
Yes, there is a way to do it using RSampleInfo (ROOT: ROOT::RDF::RSampleInfo Class Reference). There is a tutorial both in c++ and python showcasing some use of DefinePerSample including retrieving some of the information stored in the corresponding specification json file: