  The spectrum of laser-plasma-generated X-rays is very important as it can
characterize electron dynamics and also be useful for applications, and
nowadays with the forthcoming high-repetition-rate laser-plasma experiments,
there is a raising demand for online diagnosis for the X-ray spectrum. In this
paper, scintillators and silicon PIN diodes are used to build a wideband online
filter stack spectrometer. The genetic algorithm is used to optimize the
arrangements of the X-ray sensors and filters by minimizing the condition
number of the response matrix, thus the unfolding error can be significantly
decreased according to the numerical experiments. The detector responses are
quantitatively calibrated by irradiating the scintillator and PIN diode using
different nuclides and comparing the measured gamma-ray peaks. Finally, a
15-channel spectrometer prototype has been implemented. The X-ray detector,
front-end electronics, and back-end electronics are integrated into the
prototype, and the prototype can determine the spectrum with 1 kHz repetition
rates.
