Triggered Board Reader: A Board Reader that only sends fragments upon request
Ron and I were discussing the integration of DCS-style readout into an artdaq system, and we hit upon the idea that a designated Board Reader or Event Builder should send a message whenever it starts an event. Any DCS Board Readers in the run would use this message and send their current data (or an empty fragment if they don't have any). This would allow DCS data to be collected in the same way (and as part of the same system) as DAQ data, and shouldn't require any further upstream changes (as ART allows us to pick out fragments by type later on, DCS and DAQ modules can be run side-by-side over a stream that contains both, and at the Aggregator level, they can be saved to two separate streams, if desired).
We think that the Event Builder sending messages whenever it opens an event might be the more robust way of doing this, and any Board Reader which doesn't use the message can simply ignore it. Here's a simple diagram showing a timeline of events in this scheme:
Explanation: EVB receives SeqId 1 from BR2 at tick 5, sends trigger message. BRs 1 and 3 send their SeqId 1 at tick 6. TBR1 sends its value from tick 2, TBR2 sends a null. EVB receives SeqId 2 from BR 3 at tick 13, TBR1 sends null in response to EVB trigger message, TBR2 sends value from tick 12 (value from tick 9 is discarded). Tick 20, everybody has current data, but tick 26, both TBRs send 0s.
#1 Updated by Eric Flumerfelt about 6 years ago
Trying to get ASCII timeline to display correctly...
123456789012345678901234567890 BR =====|=======|=====|=====|==== BR ====|========|======|=====|=== BR =====|======|======|=====|==== TBR =|=================|========== TBR ========|==|======|=========|= EVB ====|=======|======|=====|====
#2 Updated by Eric Flumerfelt about 6 years ago
From OTS Software Breakout meeting 2/24/15:
Receive and translate trigger message (either xmlrpc or some form of broadcast/multicast)
trigger(timestamp, width) Method that sets the trigger object
triggerN(ts_start, width, N, freq) method calls trigger(ts, width) N times at freq frequency.
In getNext_ loop, wait for trigger (buffering data if necessary)
Return data point(s) for relevant interval in Fragment
EventBuilder would send trigger messages or some external trigger process could send triggerN messages.
#7 Updated by Eric Flumerfelt over 5 years ago
- Status changed from New to Assigned
- Assignee set to Eric Flumerfelt
- % Done changed from 0 to 90
TriggeredBoardReader code is in the artdaq feature/triggeredBoardReader branch. It has been tested to work in three modes: Triggered (sends latest data only when triggered), Untriggered (sends data when it gets data or receives a trigger), and BufferedTriggered (stores all data points between triggers).