New features, removing old scripts
DISCLAIMER please check this MR carefully as there are probably some cases which I didn't fully think through
It is an attempt to cleanup the package and introduce some new features. We could push it to a new upstream branch or even merge it into master after creating a tag (This makes patches for the current master a bit more cumbersome though).
During cleanup, I most likely have removed scripts which you are still using. I would like to phase them out slowly and therefore would like you to move to the more modern alternatives with projects you are currently working on. Please let me know whenever there are problems with them or if features are missing.
Deleted scripts
addFriends
Reason: has been integrated into all scripts using RDataFrame
applyMVA
Reason: it's not safe. It takes variables from scripts rather than parsing it from the weight file
Alternative: elwms
drawPlots
Reason: super-seeded by draw_stuff
stuff2hist
Reason: super-seeded by chain2hist (except the RooDataSet->hist part, but that was never used I guess)
tree_trimmer
Reason: largely super-seeded by tree_trimmerRDF and elwms
New features
search and replace in config file from command line
Introduced -j option that allows to pass a search-replace pair for the config file via the command line. This allows to pass wildcards like run period and channel from your snakemake workflow to your config file. It aims towards templated analysis workflows where you would only have a single high level config file (like the snakemake config file).
The syntax is <executable> -c <cfg> -j '<search0>:<replace0>;<search1>:<replace1>;...' ... which will replace all occurrences of <search0> with <replace0> in the config file <cfg>. Then it will replace <search1> with <replace1>, so that even nested search-replace pairs are possible (i.e. is a substring of )
Scripts that have the new -j option:
chain2histRDFdraw_stuffelwmstrainMVAtree_trimmerRDF
refactored draw_stuff
Giving input root files is now mandatory. The objects to draw will be searched for in the list of input files.
Moreover it is recommended to use the -j option to pass the names of objects to draw to draw_stuff, but also to the producing script like chain2histRDF to have them transparent in the data-flow.
smaller things
- prefixes for output files of
elwmsare not hardcoded any more - added small documentation headers
- removed redundant includes
- removed
-pwhere it is not necessary (essentially everywhere in this package) - removed
ParseEnvNamesince it should be possible to pass what is needed with the-joption - added
.gitignore