Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
rooteventselector Namespace Reference

Command line to copy subsets of trees from source ROOT files to new trees on a destination ROOT file. More...

Functions

 execute ()
 get_argparse ()

Variables

str description = "Copy subsets of trees from source ROOT files"
str EPILOG
str FIRST_EVENT_HELP = "specify the first event to copy"
str LAST_EVENT_HELP = "specify the last event to copy"

Detailed Description

Command line to copy subsets of trees from source ROOT files to new trees on a destination ROOT file.

Function Documentation

◆ execute()

rooteventselector.execute ( )

Definition at line 64 of file rooteventselector.py.

◆ get_argparse()

rooteventselector.get_argparse ( )

Definition at line 51 of file rooteventselector.py.

Variable Documentation

◆ description

str rooteventselector.description = "Copy subsets of trees from source ROOT files"

Definition at line 20 of file rooteventselector.py.

◆ EPILOG

str rooteventselector.EPILOG
Initial value:
1= """Examples:
2- rooteventselector source.root:tree dest.root
3 Copy the tree 'tree' from 'source.root' to 'dest.root'.
4
5- rooteventselector -f 101 source.root:tree dest.root
6 Copy a subset of the tree 'tree' from 'source.root' to 'dest.root'. The new tree contains events from the old tree except the first hundred.
7
8- rooteventselector -l 100 source.root:tree dest.root
9 Copy a subset of the tree 'tree' from 'source.root' to 'dest.root'. The new tree contains the first hundred events from the old tree.
10
11- rooteventselector --recreate source.root:tree dest.root
12 Recreate the destination file 'dest.root' and copy the tree 'tree' from 'source.root' to 'dest.root'.
13
14- rooteventselector -c 1 source.root:tree dest.root
15 Change the compression factor of the destination file 'dest.root' and copy the tree 'tree' from 'source.root' to 'dest.root'. For more information about compression settings of ROOT file, please look at the reference guide available on the ROOT site.
16
17- rooteventselector -s "(branch1Value > 100)&&( branch2Value )" source.root:tree dest.root
18 Copy the tree 'tree' from 'source.root' to 'dest.root' and apply a selection to the output tree.
19
20- rooteventselector -e "muon_*" source.root:tree dest.root
21 Copy the tree 'tree' from 'source.root' to 'dest.root' and remove branches matching "muon_*"
22
23- rooteventselector -e "*" -i "muon_*" source.root:tree dest.root
24 Copy the tree 'tree' from 'source.root' to 'dest.root' and only write branches matching "muon_*"
25"""

Definition at line 25 of file rooteventselector.py.

◆ FIRST_EVENT_HELP

str rooteventselector.FIRST_EVENT_HELP = "specify the first event to copy"

Definition at line 22 of file rooteventselector.py.

◆ LAST_EVENT_HELP

str rooteventselector.LAST_EVENT_HELP = "specify the last event to copy"

Definition at line 23 of file rooteventselector.py.