def METHOD_NAME(self, a):
    if not self.lockbox.is_locked_and_final(loglevel=0):
        setattr(self.parent, self.name, None)
        self._clear()
    # get the rms of the current error signal and store it
    rms, pdh, time = self.rms, self.pdh, self.time
    dt = time - self._lasttime[-1]
    self._lastrms.append(rms)
    self._lastpdh.append(pdh)
    self._lasttime.append(time)
    while len(self._lastrms) > self.max_length:
        self._lastrms.pop(0)
        self._lastpdh.pop(0)
        self._lasttime.pop(0)
    # compute integral
    self.current_gain_factor += pdh * self.parent.unity_gain_frequency * dt * 2.0 * np.pi
    self.phase = self.phase + self._phase_step
    self.lockbox.final_stage.gain_factor = self.current_gain_factor * (1.0 + self.parent.amplitude*np.cos(self.phase))
    self.plotappend(b=rms, g=pdh, r=self.current_gain_factor, y=self.lockbox.final_stage.gain_factor)