> One aspect of the MIDAS history plotting I find frustrating is the sequence for adding a new history
> variable and then plotting them. ...
this has been a problem in MIDAS for a very long time, we have tried and failed to fix/streamline/improve
it many times and obviously failed. many times.
this is what must happen when adding a new history variable:
1) new /eq/xxx/variables/vvv entry must show up in ODB
1a) add the code for the new data to the frontend
1b) start the frontend
1c) if new variable is added in the frontend init() method, it will be created in ODB, done.
1d) if new variable is added by the event readout code (i.e. via MIDAS event data bank automatically
written to ODB by RO_ODB flags), then we need to start a run.
1e) if this is not periodic event, but beam event or laser event or some other triggered event, we must
also turn on the beam, turn on the laser, etc.
1z) observe that ODB entry exists
3) mlogger must discover this new ODB entry:
3a) mlogger used to rescan ODB each time something in ODB changes, this code was removed
3b) mlogger used to rescan ODB each time a new run is started, this code was removed
3c) mlogger rescans ODB each time it is restarted, this still works.
so sequence is like this: modify, restart frontend, starts a run, stop the run, observe odb entry is
created, restart mlogger, observe new mhf files are created in the history directory.
4) mhttpd must discover that a new mhf file now exists, read it's header to discover history event and
variable names and make them available to the history panel editor.
it is not clear to me that this part currently works:
4a) mhttpd caches the history event list and will not see new variables unless this cache is updated.
4b) when web history panel editor is opened, it is supposed to tell mhttpd to update the cache. I am
pretty sure it worked when I wrote this code...
4c) but obviously it does not work now.
restarting mhttpd obviously makes it load the history data anew, but there is no button to make it happen
on the MIDAS web pages.
so it sounds like I have to sit down and at least retest this whole scheme to see that it works at least
in some way.
then try to improve it:
a) the frontend dance in (1) is unavoidable
b) mlogger must be restarted, I think Stefan and myself agree on this. In theory we could add a web page
button to call an mlogger RPC and have it reload the history. but this button already exists, it's called
"restart mlogger".
c) newly create history event should automatically show up in the history panel editor without any
additional user action
d) document the two intermediate debugging steps:
d1) check that the new variable was created in ODB
d2) check that mlogger created (and writes to) the new history file
this is how I see it and I am open to suggestion, changes, improvements, etc.
K.O. |