  Recently we predicted a random blinking, i.e. macroscopic quantum jumps, in
the fluorescence of a laser-driven atom-cavity system [Metz et al., Phys. Rev.
Lett. 97, 040503 (2006)]. Here we analyse the dynamics underlying this effect
in detail and show its robustness against parameter fluctuations. Whenever the
fluorescence of the system stops, a macroscopic dark period occurs and the
atoms are shelved in a maximally entangled ground state. The described setup
can therefore be used for the controlled generation of entanglement. Finite
photon detector efficiencies do not affect the success rate of the state
preparation, which is triggered upon the observation of a macroscopic
fluorescence signal. High fidelities can be achieved even in the vicinity of
the bad cavity limit due to the inherent role of dissipation in the jump
process.
