slaclab / smurf-processor

SMuRF data processor
Other
1 stars 3 forks source link

pyrogue_server.py issues #8

Open jlashner opened 4 years ago

jlashner commented 4 years ago

Currently, the pyrogue_server.py is a huge file that is essential to starting the rogue server. The way that its currently set up requires 3 or more slightly different copies of this file being maintained in parallel, one for each experiment that wants to use pyrogue (smurf2mce-base, smurf-processor-base, smurf-streamer, .....). This is extremely inefficient, especially since its hard to propagate updates downstream.

It would be great if we instead put this into a PyrogueRunner class built into pyrogue or somewhere else publicly available that does most of the setup automatically. Then we could import it and re-use the common code for each experiment. It could provide a wrapper for stream_connect or other functions that might be used differently between experiments. It could also provide a function that returns an argparse command-line parser with all of the required options already added, so it would be easy to add additional options in a separate argument group.