AnalysisSystemForRadionucli.../RadionuclideMessage.h
2024-09-11 16:44:40 +08:00

62 lines
2.9 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef RADIONUCLIDEMESSAGE_H
#define RADIONUCLIDEMESSAGE_H
#include "AbstractSpectrumDataMessage.h"
#include "DataManager_Define.h"
#include <QVariant>
class QTextStream;
class RadionuclideMessage : public AbstractSpectrumDataMessage
{
public:
explicit RadionuclideMessage();
~RadionuclideMessage();
bool AnalysePHD_Msg(QString &msg_string);
bool AnalysePHD_File(QString phd_name);
RadionuclideData::AnalyseDataType GetAnalyseDataType();
const QVariant GetBlockData(QString& block_name);
virtual bool IsValid();
virtual void ClearData();
static QVector<long> GetHistogramProjectedDataValue(
RadionuclideData::HistogramBlock &histogram, Qt::Orientation orientation);
private:
void InitBlockFlagInfo();
bool AnalyseMessgeBody(QTextStream& content);
bool Analyse_Header_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Comment_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Collection_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Acquisition_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Processing_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Sample_Block(QTextStream& content, QString& nextBlock);
bool Analyse_g_Energy_Block(QTextStream& content, QString& nextBlock);
bool Analyse_b_Energy_Block(QTextStream& content, QString& nextBlock);
bool Analyse_g_Resolution_Block(QTextStream& content, QString& nextBlock);
bool Analyse_b_Resolution_Block(QTextStream& content, QString& nextBlock);
bool Analyse_g_Efficiency_Block(QTextStream& content, QString& nextBlock);
bool Analyse_ROI_Limits_Block(QTextStream& content, QString& nextBlock);
bool Analyse_bg_Efficiency_Block(QTextStream& content, QString& nextBlock);
bool Analyse_TotalEff_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Ratios_Block(QTextStream& textStream, QString& nextBlock);
bool Analyse_g_Spectrum_Block(QTextStream& content, QString& nextBlock);
bool Analyse_b_Spectrum_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Histogram_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Calibration_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Certificate_Block(QTextStream& content, QString& nextBlock);
bool Analyse_Gps_Block(QTextStream& content, QString& nextBlock);
bool Analyse_b_self_Attenuation_Block(QTextStream& content, QString& nextBlock);
bool Analyse_b_Efficiency_Block(QTextStream& content, QString& nextBlock);
bool Verity_SampleReferenceId(QString srid);
private:
bool bIsValid;
QStringList block_flag;
QVariantMap radionuclide_msg_data; // 因解析的数据的结构不同请其统一存储至QVariantMap容器中
RadionuclideData::AnalyseDataType analyse_data_type;
QString m_system_type = "";
};
#endif // RADIONUCLIDEMESSAGE_H