Characterization of a front-end electronics for the monitoring and control of hadrontherapy beams