snoplus / orca

Git repository tracking the main Orca svn for SNO+ development
2 stars 13 forks source link

Orca alarm when missing run ID from DB #486

Closed mastbaum closed 6 years ago

mastbaum commented 6 years ago

Post an Orca alarm when unable to fetch the next run number from the database. This is in addition to the existing warning printed to the log, but meant to be more attention-grabbing (but non-blocking).

Example of the alarm dialog window, with the detail drawer expanded: screenshot 2018-02-05 10 42 10 An audible beep also sounds periodically until the alarm is acknowledged.

mastbaum commented 6 years ago

Incidentally, I noticed I can't see the alarm dialog nib with Xcode 7.3.1: screenshot 2018-02-05 10 24 19 Should we bump development (including the test stand Xcode) to version 8?

tlatorre-uchicago commented 6 years ago

I think we can bump the version we use to build or develop on at will, it's not crucial (in fact, the most recent version is 9.2 on High Sierra), but we shouldn't update the teststand version. Although there aren't any clear minimum versions that we are supposed to support for Orca, I think Mark Howe still wants to keep support for OSX 10.6 and so it's good to make sure we can still build using older XCodes.

mastbaum commented 6 years ago

Now I keep a pointer to the ORAlarm in SNOPModel -- pattern is the same as e.g. ORRunModel. It will also clear automatically if the run number is fetched successfully.

mastbaum commented 6 years ago

I don't think such a check is necessary. Apple Obj-C docs say:

... it’s perfectly acceptable in Objective-C to send a message to nil. If you do send a message to nil, obviously nothing happens.

This is also follows the pattern of ORRunModel.

tlatorre-uchicago commented 6 years ago

merged.