Redefinition of Physical and Logical detectors #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dispatcher get
goal_statefromMongoConnect.get_wanted_statewhere there is a loop on physical detectors and thelatest_statusfromMongoConnecy.get_updateusing the current configuration that is coming from MongoConnect.get_super_detector. Then it loops among thelatest_status.keysand checks the goal status, the variable detector is used for both physical and logical detectors, the main goal of the performed changes is to avoid this and have a more clear and separate definition of the two chategories of detectors.Main changes are listed:
in
MongoConnect.pythe logical detector is created with the functionget_logical_detector(formerget_super_detector) with five possible linking cases that are addressed separately with logical statements, in this way is possible to have proper name for the logical detector (e.g., in case of all physical detectors linked isall_linkedinstead oftpc). The five cases:in
dispatcher.pyadded new loop: 1st loop on logical detectors usinglatest_status.keys, 2nd loop on physical detectors usinglatest_status[log_det]['detectors'].keys, the printed status then reports the aggregate status for both logical and physical detectorsin
DAQController.pythe input detector explicity calledlogical, in particular incontrol_detectorandcheck_timeouts; the first physical detector is used as representative of the logical detector, needed to take goal mode and status and count the missed arm cycles and error stops (also functionshandle_timeout,stop_detector_gentlyandcheck_run_turnoverhas been changed in order to use both logical and physical detectors); also inMongoConnect.pymodifiedinsert_run_docand andset_stop_timein
hypervisor.pychanges inlinked_nuclear_option: modified loop to check for the status of physical detectors, added debug messages, added check of all hosts (readers and controllers) to see if they are responding, calculated again the aggregate status of the physical detectors and compared with the one fromMongoConnect.aggregate_status, if the two status are not matching or the detector is in[ERROR, TIMETOUT, UNKNOWN] the detector is included intimeout_listotherwise inrunning_list