ECDC-3618 add observer pattern to commons
Created by: tbukovics
Issue reference / description
Add templates to implement the observer pattern, which will be used by timepix to make possible fluent data event handling and processing independent from the parser. Simple flow chart how event based dataflow would look with the observer.
flowchart LR;
A[RingBuffer Data Input] -->|Data| B{Data Parser}
B -->|PIXEL Data| C[PIXEL Publisher]
B -->|TDC Data| D[TDC Publisher]
B -->|EVR Data| E[EVR Publisher]
TimingEventHandler{TimingEventHandler}
PixelEventHandler{PixelEventHandler}
D -.-> |subscribe| TimingEventHandler
E -.-> |subscribe| TimingEventHandler
TimingEventHandler --- PixelEventHandler
C -.-> |subscribe| PixelEventHandler
Checklist for submitter
-
Check for conflict with integration test -
Unit tests pass
Nominate for Group Code Review
-
Nominate for code review