Warning, /snippets/Tree_Pruning/README.md is written in an unsupported language. File is not indexed.
0001 # Tree Pruning Script
0002
0003 This is (appropriately) a trimmed down version of a short script I made for the analysis tutorials. The script takes in an EICrecon output file and trims it down to a smaller subset of branches. This might be useful for a few reasons -
0004
0005 1. Easier for new users to digest a simpler file (avoid getting overwhelmed with the number of branches there by default)
0006 2. Cut down on the size of files if you need to copy them (but don't need all of the information contained within them.
0007
0008 There's some basic checking in terms of whether the file exists (and if it's a root file) at the start. Note that currently, it does NOT check if branches exist before trying to grab them. Maybe one for the future.
0009
0010 ## Execution
0011
0012 Execute via -
0013
0014 root TreePrune.C
0015
0016 You will be prompted for an input file. You could specify this at execution too -
0017
0018 root 'TreePrune.C("InputFilePath")'
0019
0020 ## Disclaimer
0021
0022 I tested this by pruning files utilised in the analysis tutorial and checking the output from running the exercise scripts on the pruned and unpruned versions. The output was identical. It should probably be tested a bit further if you want to rely on it for something a bit beyond this though.