Non-standard acq_params inheritance in AcqusitionObject class when re-parenting
MR !4760 (merged) introduced a very specific code in AcquisitionObject
class.
@parent.setter
def parent(self, p):
self.__parent = p
if p.device == self.device and self.device is not None: # <==== THIS
self.__start_once = p.start_once # <==== THIS
self.__prepare_once = p.prepare_once # <==== THIS
=> This piece of code should be in MusstAcquisitionSlave
only.
This code is only working with MusstAcquisitionMaster
and MusstAcquisitionSlave
because of there non-standard signature coming from the fact there are used outside the default chain (only in hand written custom scans).
In custom scans with the musst there are no CounterControllers
, therefore MusstAcquisitionMaster
and MusstAcquisitionSlave
acq objs take the musst card as self.device
.
And AcquisitionChannel
are added in '_MusstAcquisitionSlave.init'.
Usually, in the standard case, AcquisitionObject.device
is the CounterController
not directly the hw_device. (device
word is very miss leading!)
So in the standard case p.device == self.device
is wrong and should be p.device is self.device._master_controller
(like in IntegratingCounterAcquisitionSlave
class).
Note that with the default chain, AcquisitionChannel
are added on acqObj by the ChainNode
while calling node.create_acquisition_object()
Note: MusstDefaultAcquisitionMaster
has been modified wrongly in MR !2915 (merged) adding the musst
arg in signature whereas controller
is already given and controller.musst
already exist (with controller
==MusstIntegratingCounterController
).