From plasma to nanoparticles: optical and particle emission of a spark discharge generator