A high-resolution spectrometer is necessary for characterizing laser-wakefield accelerated multi-GeV electron beams. During tight beam-time schedules and high-repetition rate experimental conditions, robust real-time monitoring tools and suitable data analysis methods have to be developed. Here, we report in detail the spectrometer system, simulated in Geant4, and the dipole magnetic field, measured and modeled in COMSOL, for an accurate characterization of the energy spectrum of the electron beam. We present a set of computational tools employed in real-time diagnostics, image processing, and energy spectra reconstruction.