Data management and analysis techniques used in the near X-ray and gamma-ray spectrometer systems