-
Notifications
You must be signed in to change notification settings - Fork 2
Labels
enhancementNew feature or requestNew feature or request
Description
This was discussed on Slack, but moving the discussion here.
Let's separate two different use-cases:
- Sometimes you only want to write an event to disk if it fulfills some specific condition, e.g. having a pulse above a certain readout threshold. For this, you could pass a lambda to the RunConsumer that evaluates each event before writing it to disk.
- If you are implementing a task with some sort of smart scan, e.g. when scanning over CALIB to see where the TOT threshold lies you'd like decrease or increase CALIB dynamically based on the result. Or more generally, if you want to implement something beyond basic grid scans. For this, the user needs to get a handle on the raw event packets themselves.
I propose that we modify DecodeAndWrite (or make another DAQRunConsumer) that
- Buffers every event taken since the last startRun().
- Has a function std::vectorpacking::SingleROCEventPacket& readBuffer(), that returns the whole buffer to the user.
- Optionally, only writes an EventPacket to disk if it fulfills some user specified condition.
- Clears the buffer the next time startRun() is called.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request