LDMX-Software / pflib

Library and tool for interacting with polarfires.
https://ldmx-software.github.io/pflib/
4 stars 0 forks source link

Iss56 - Split PFtool into multiple TUs #60

Closed EinarElen closed 2 years ago

EinarElen commented 2 years ago

This PR splits most of pftool.cc into distinct translation units and adds a corresponding header for pftool itself. This makes quick development a lot easier, reduces risks of conflicts with multiple developers, and makes it easier to write simple functions that can be used in multiple places, and, most importantly, faster to understand for people that aren't familiar with the code.

It's not the pretties way of doing it, e.g. all the TUs are called pftool_foo.h/cc, but its enough to get the benefits from it. I can of course update things if someone has a strong preference :)

Currently, all menus are separated out from their corresponding TUs, but if https://github.com/LDMX-Software/pflib/tree/auto-load-menu gets added then that can be updated as well which would make updating things even easier.

tomeichlersmith commented 2 years ago

I merged an updated ALIGN function by @Skelpdar in PR #62 just now, can you update this branch to include that new method?

EinarElen commented 2 years ago

I was expecting to do as much :)

tomeichlersmith commented 2 years ago

I just did it :+1: wasn't as hard as I was worried about

EinarElen commented 2 years ago

Nice!