Design and operation of the electrogun, an electrothermal gun for producing metal and carbon plasma jets