Draft: Configure SCDAQ during runtime
Hi,
This is a first draft of what I was thinking to have for the configuration of SCDAQ during runtime by the FM.
The idea is that we can still start SCDAQ with the --config
flag, but we can also always send a configuration via the network using the config
keyword. When we get the configuration in the latter way we first store the received configuration in /tmp
and then (try to) apply it. Currently this is done immediately, but in the final version I'd like to only do that at a start transition (in that case I'd only write out the configuration to the file once we actually trigger that transition). Please let me know if the general plan seems fine for you.
Then, I am currently doing a spin wait when we didn't get a config file, but I think it would be better if we could have some mutex. I don't yet know how to do that with the current infrastructure (I started reading a bit about boost and mutexes so far.. ), but if in particular @pzejdl has an opinion/idea that would be very useful.
Finally, I realised that we're currently throwing exceptions in lots of places in the config
class which was reasonable when we started with one file and couldn't fix our mistake once running. I think with the new system we should probably get rid of the exceptions and just log an error and wait for a valid configuration via network. What do you think?
-d