Gain dynamics in doped-fiber amplifiers for added and dropped signals