All-optical model for the generation and the detection of macroscopic quantum coherence