Hi Nathanael,
and welcome to the ROOT forum!
There are several threads on the forum that should answer your question, the most recent being RDF filter the content of branches
If checking that out/searching the forum does not clarify things, please let us know.
Cheers,
Enrico