Refactor Pulse Finding
Context
Pulse Finding is the next major subsystem we need to integrate. Our architecture design involved using a Strategy pattern to encapsulate this functionality.
Summary
Update: I moved all of the logic related to selecting the Pulse Finding strategy and running it against all channels of the event to a new class called PulseFindingProcessor
. I also added a higher level interface called EventProcessor
that I'm thinking we can reuse for Pulse Analysis (and the client can reuse in the future for other processors).
Added the IPulseFindingStrategy
interface class and a sample implementation called PFS
. The sample implementation is my attempt at extracting and refactoring the pulse finding code from the old WaveformProcessor.cxx
, but the idea is that adding new strategies would just consist of a few simple steps:
- Write a class that extends
IPulseFindingStrategy
and overrides the appropriate methods - Register the class's name in
PulseFindingProcessor
's constructor - Set the runtime parameter (currently done per-channel) in the JSON config file.
After the new strategy's code is written, changing strategies dynamically will just be a matter of changing the input file.
How was this tested?
Ran vanwftk
with our test data and a variety of parameters. Haven't quite locked in the right values yet to replicate the original run's results but Tyler is working to figure out if it's an issue with the runtime params that we have or with the code itself.