A monolithically integrated magneto-optoelectronic circuit