ITADN

Allow for passing additional fields from triggerinfo to prepare* logic methods.

#1266Openjwlodek 创建于 2026-05-12
J
jwlodekcommented
Before the `StandardDetector` rewrite, the `DetectorController` classes would implement an overall `prepare`, which would take in a `TriggerInfo` dataclass object instance, whereas now they implement methods for each trigger type, which only take in the fields relevant to each. Unfortunately, this makes the `prepare` mechanism for `StandardDetector`'s somewhat less flexible. If I want to also have prepare setup some signals that rely on other parameters, I need to make a separate flyer object to prepare it which is not intuitive. I suggest that either the methods be changed back to take in the entire trigger info as before (and the fields that are not needed just won't be accessed by the method), or some machinery to be added to be able to extract the signature of the logic and to add fields from the triggerinfo as arguments or keyword arguments. A practical example in how this is being used: We implemented a DetectorController for our PandABox that basically combines the base Panda trigger logic with the PcompInfo flyer controller that sets up the pulses for the pcomp block. then the PandA is just prepared with a TriggerInfo that also includes things like step width etc. I find this to be nicer than having to make a second device that is just the Pcomp flyer and prepare that also. ## Acceptance Criteria - There is a way to pass additional parameters to the `prepare_*` methods for a detector trigger logic.
4 条评论