cp3-llbb / CommonTools

Utilities to mass create histograms, flat trees, and more
2 stars 9 forks source link

Refactor histFactory and treeFactory #121

Closed blinkseb closed 7 years ago

blinkseb commented 7 years ago

HistFactory and treeFactory share most of their code, and were a pain to maintain since adding a feature in one means duplicating the code to add the same thing in the other. This PR refactors the code, allowing to share the code between the two utilities. It's now the same executable, and the mode in which running is decided by the name of the executable:

Nothing change for the user, the scripts createPlotter.sh and createSkimmer.sh are still there and work as before. Only difference is that they are now both in the same directory.

During the refactoring, I implemented https://github.com/cp3-llbb/CommonTools/pull/118#issuecomment-254189417. You must now use include_directories to specify the include directories, and headers to specify the new header to include.

TODO:

Closes #118

swertz commented 7 years ago

And I'll try to validate at some point unless someone has things ready to do it before...

blinkseb commented 7 years ago

PR updated with fixes!

blinkseb commented 7 years ago

As discussed IRL, I updated the PR to also add support for libraries and library_directories, making #118 obsolete. It worked as expected during my tests.

swertz commented 7 years ago

Many thanks! I'll do an extra test run on condor tomorrow just in case ;)

swertz commented 7 years ago

All good! Thanks again!