Rooteventselector and multiple TTree with the same name

I want to use the nice commandline tool rooteventselector to apply a simple selection on a tree.

The file looks like this:


The different trees with the same name are of course the different revisions from writing the file. However, if I try to use this with rooteventselector source.root:DYTuple/DecayTree dest.root, it complains about those duplicate names and does not process them, instead of taking the most recent revision like all other ROOT tools I know of:

WARNING: Same name objects aren't supported: 'DYTuple/DecayTree' of 'source.root' won't be processed

Is there a way to specify that only the latest revision should be taken or a simple way to remove the redundant revisions (since I don’t actually need them)?

just a guess, have you tried:

rooteventselector source.root:DYTuple/DecayTree;73 dest.root


Yes, I also tried that (quoting the file name because ; has a special meaning in the shell). In that case it does not find the tree at all:

$ rooteventselector 'source.root:DYTuple/DecayTree;73' dest.root --selection "..."
WARNING: can't find DYTuple/DecayTree;73 in source.root

Does rootcp has the same problem with your file ?

Yes, it does. Since they both use the same underlying method to determine the source and destination, this is not very surprising, though.

I was asking because rootcp help says:

Note: If an object has been written to a file multiple times, rootcp will copy only the latest version of that object.

So I would have assumed rooteventselector does the same.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.