AnalysisSystemForRadionucli.../DataManager_Define.h

867 lines
38 KiB
C
Raw Normal View History

2024-06-04 15:25:02 +08:00
#ifndef DATA_MANAGE_DEFINE_H
#define DATA_MANAGE_DEFINE_H
#include <QtCore/qglobal.h>
#include <QVector>
#include <QMetaType>
#include <QString>
#define DATE_FORMAT QLatin1String("yyyy/MM/dd")
#define TIME_FORMAT QLatin1String("hh:mm:ss.z")
#define DATATIME_FORMAT QLatin1String("yyyy/MM/dd hh:mm:ss.z")
#define DATATIME_FORMAT_NOSPACE QLatin1String("yyyy/MM/ddhh:mm:ss.z")
#define DATATIME_FORMAT_SECONDS QLatin1String("yyyy/MM/ddhh:mm:ss")
#define DATATIME_FORMAT_SPACE_SECONDS QLatin1String("yyyy/MM/dd hh:mm:ss")
#define ORDER_HEADER QLatin1String("#Header")
#define ORDER_COMMENT QLatin1String("#Comment")
#define ORDER_COLLECTION QLatin1String("#Collection")
#define ORDER_ACQUISITION QLatin1String("#Acquisition")
#define ORDER_PROCESSING QLatin1String("#Processing")
#define ORDER_SAMPLE QLatin1String("#Sample")
#define ORDER_G_ENERGY QLatin1String("#g_Energy")
#define ORDER_B_ENERGY QLatin1String("#b_Energy")
#define ORDER_G_RESOLUTION QLatin1String("#g_Resolution")
#define ORDER_B_RESOLUTION QLatin1String("#b_Resolution")
#define ORDER_G_EFFICIENCY QLatin1String("#g_Efficiency")
#define ORDER_ROI_LIMITS QLatin1String("#ROI_Limits")
#define ORDER_B_GEFFICIENCY QLatin1String("#b-gEfficiency")
#define ORDER_TOTALEFF QLatin1String("#TotalEff")
#define ORDER_RATIOS QLatin1String("#Ratios")
#define ORDER_G_SPECTRUM QLatin1String("#g_Spectrum")
#define ORDER_B_SPECTRUM QLatin1String("#b_Spectrum")
#define ORDER_HISTOGRAM QLatin1String("#Histogram")
#define ORDER_CALIBRATION QLatin1String("#Calibration")
#define ORDER_CERTIFICATE QLatin1String("#Certificate")
#define ORDER_STOP QLatin1String("STOP")
#define ORDER_BEGIN QLatin1String("BEGIN")
#define DATATYPE_QCPHD QLatin1String("QCPHD")
#define DATATYPE_DETBKPHD QLatin1String("DETBKPHD")
#define DATATYPE_SAMPLEPHD QLatin1String("SAMPLEPHD")
#define DATATYPE_GASBKPHD QLatin1String("GASBKPHD")
#define DATETYPE_SOH QLatin1String("RMSSOH")
#define DATETYPE_MET QLatin1String("MET")
#define DATETYPE_ALERT_FLOW QLatin1String("ALERT_FLOW")
#define DATETYPE_ALERT_SYSTEM QLatin1String("ALERT_SYSTEM")
#define DATETYPE_ALERT_TEMP QLatin1String("ALERT_TEMP")
#define DATETYPE_ALERT_UPS QLatin1String("ALERT_UPS")
#define SYSTEMTYPE_P QLatin1String("P") //P for particulate;
#define SYSTEMTYPE_B QLatin1String("B") //B for gaswith 3-D β - γ coincidence detection
#define SYSTEMTYPE_G QLatin1String("G") //G for all other gas systems (high-resolu-tion γ-spectrometry or 2-D β-γ coinci-dence detection)
#define FILE_SAMPLE_NAME_FORMAT QLatin1String("[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}(_S.PHD)$")
#define FILE_ALL_NAME_FORMAT QLatin1String("[a-zA-Z]{3}[0-9]{2}_[0-9]{3}-[0-9]{8}_[0-9]{4}(_G.PHD|_Q.PHD|_S.PHD|_D.PHD)$")
#define DEFAULT_DATA_PATH QLatin1String("DefaultData")
#define CFG_FILE_PATH tr("./cfg/")
#define CFG_FILE_NAME tr("filecfg.ini")
#define CFG_DELETE_FILE_NAME tr("filedelete.ini")
#define GROUP_DELETE_FILE tr("file")
#define KEY_DELETE_FILE tr("time")
//#define VALUE_DELETE_FILE tr("")
#define GROUP_CFG_FILE tr("FILE_NAME")
#define KEY_BG_AUTO_PROCESS tr("AUTO_DATA_PROCESS")
#define VALUE_BG_AUTO_PROCESS_FILE_NAME tr("auto_data_process.ini")
#define GROUP_BG_THREAD tr("THREAD")
#define KEY_GROUP_BG_THREAD_LIMIT tr("NUMBER")
#define VALUE_GROUP_BG_THREAD_LIMIT tr("2")
#define GROUP_BG_AUTO_ACQUIR tr("GET")
#define KEY_BG_AUTO_FILE_SOURCE_PATH tr("DETECT_FILE_PATH")
#define VALUE_BG_AUTO_FILE_SOURCE_PATH tr("./datatest/filesource/")
//#define GROUP_BG_AUTO_ACQUIR tr("acquire")
//#define KEY_BG_AUTO_FILE_MAIL_SAVE_PATH tr("FILEMAILSAVEPATH")
//#define VALUE_BG_AUTO_FILE_MAIL_SAVE_PATH tr("./datatest/mailload/")
//#define KEY_BG_AUTO_ACUIRE_MAILTIMEOUT tr("MAILDETECTTIMEOUT")
//#define VALUE_BG_AUTO_ACUIRE_MAILTIMEOUT tr("3")
#define KEY_BG_AUTO_ACUIRE_FILETIMEOUT tr("DETECT_FILE_INTERVAL_TIME")
#define VALUE_BG_AUTO_ACUIRE_FILETIMEOUT tr("600")
#define GROUP_BG_AUTO_LOG tr("LOG")
#define KEY_BG_AUTO_LOG_PATH tr("PATH")
#define VALUE_BG_AUTO_LOG_PATH tr("./datatest/log")
#define GROUP_BG_AUTO_DEAL tr("DEAL")
#define KEY_BG_AUTO_DEAL_TIMEOUT tr("UN_DEAL_SEARCH_FILE_TIMEOUT")
#define VALUE_BG_AUTO_DEAL_TIMEOUT tr("43200")
#define KEY_BG_AUTO_DEAL_ID_TIMEOUT tr("UN_DEAL_SEARCH_ID_TIMEOUT")
#define VALUE_BG_AUTO_DEAL_ID_TIMEOUT tr("43200")
#define KEY_BG_AUTO_DEAL_TIMEDETECT tr("UN_DEAL_FILE_DETECT_TIME")
#define VALUE_BG_AUTO_DEAL_TIMEDETECT tr("1800")
#define KEY_BG_AUTO_STATISTICS_TIME tr("STATISTICS_TIME")
#define VALUE_BG_AUTO_STATISTICS_TIME tr("24")
#define KEY_BG_AUTO_DELETE_FILE_INTERVAL_TIMEE tr("DELETE_FILE_INTERVAL_TIME")
#define VALUE_BG_AUTO_SDELETE_FILE_INTERVAL_TIME tr("30")
#define KEY_BG_AUTO_FILE_SAVE_PATH tr("FILE_SAVE_PATH")
#define VALUE_BG_AUTO_FILE_SAVE_PATH tr("./datatest/savefile/")
#define KEY_BG_AUTO_DETAGAS_DEFAULT_PATH tr("DETA_GAS_DEFAULT_PATH")
#define VALUE_BG_AUTO_DETAGAS_DEFAULT_PATH tr("./defaultdata/detagas/")
#define KEY_BG_AUTO_DEAL_NODEALFILEPATH tr("UN_DEAL_FILE_PATH")
#define VALUE_BG_AUTO_DEAL_NODEALFILEPATH tr("./datatest/undeal/")
#define KEY_DATABASE_FIEL_PATH tr("DATA_BASE")
#define VALUE_DATABASE_FIEL_PATH tr("data_base.ini")
#define GROUP_DATABASE tr("DATA_BASE")
#define KEY_DATABASE_TYPE tr("TYPE")
#define VALUE_DATABASE_TYPE tr("MYSQL")
#define GROUP_DATABASE_MYSQL tr("MYSQL")
#define GROUP_DATABASE_ORACLE tr("ORACLE")
#define KEY_DATABASE_HOSTNAME tr("HOSTNAME")
#define VALUE_DATABASE_HOSTNAME tr("192.168.0.101")
#define KEY_DATABASE_DATABASENAME tr("DATA_BASE_NAME")
#define VALUE_DATABASE_DATABASENAME tr("configuration")
#define KEY_DATABASE_USERNAME tr("USERNAME")
#define VALUE_DATABASE_USERNAME tr("root")
#define KEY_DATABASE_PASSWORD tr("PASSWORD")
#define VALUE_DATABASE_PASSWORD tr("123456")
#define KEY_DATABASE_PORT tr("PORT")
#define VALUE_DATABASE_PORT tr("3306")
#define VALUE_DATABAS_ORACLE_HOSTNAME tr("192.168.0.119")
#define VALUE_DATABASE_ORACLE_DATABASENAME tr("orcl")
#define VALUE_DATABASE_ORACLE_USERNAME tr("configuration")
#define VALUE_DATABASE_ORACLE_PASSWORD tr("123456")
#define VALUE_DATABASE_ORACLE_PORT tr("1521")
#define KEY_EMAIL_FIEL_PATH tr("EMAIL")
#define VALUE_EMAIL_FIEL_PATH tr("email.ini")
#define GROUP_EMAIL_SEND tr("SEND")
#define KEY_EMAIL_SEND_USER tr("USER")
#define VALUE_EMAIL_SEND_USER tr("xuhai_cpp@sina.com")
#define KEY_EMAIL_SEND_PASSWD tr("PASSWD")
#define VALUE_EMAIL_SEND_PASSWD tr("abc123456")
#define KEY_EMAIL_SEND_SERVER tr("SERVER")
#define VALUE_EMAIL_SEND_SERVER tr("smtp.sina.com")
#define KEY_EMAIL_SEND_PORT tr("PORT")
#define VALUE_EMAIL_SEND_PORT tr("25")
#define KEY_EMAIL_SEND_CONNECTTYPE tr("CONNECT_TYPE")
#define VALUE_EMAIL_SEND_CONNECTTYPE tr("0")
#define KEY_EMAIL_SEND_RECEIVER tr("RECEIVER")
#define VALUE_EMAIL_SEND_RECEIVER tr("1327783389@qq.com")
#define KEY_EMAIL_SEND_INTERVAL tr("SEND_INTERVAL")
#define VALUE_EMAIL_SEND_INTERVAL tr("10")
//#define GROUP_EMAIL_GET tr("GET")
#define KEY_EMAIL_GET_USER tr("USER")
#define VALUE_EMAIL_GET_USER tr("cnndc.rn")
#define KEY_EMAIL_GET_PASSWD tr("PASSWD")
#define VALUE_EMAIL_GET_PASSWD tr("367220")
#define KEY_EMAIL_GET_SERVER tr("SERVER")
#define VALUE_EMAIL_GET_SERVER tr("192.168.10.59")
#define KEY_EMAIL_GET_PORT tr("PORT")
#define VALUE_EMAIL_GET_PORT tr("143")
#define KEY_EMAIL_GET_CONNECTTYPE tr("CONNECT_TYPE")
#define VALUE_EMAIL_GET_CONNECTTYPE tr("0")
#define KEY_EMAIL_GET_FILE_SAVEPATH tr("FILE_SAVE_PATH")
#define VALUE_EMAIL_GET_FILE_SAVE_PATH tr("./datatest/mailload/")
#define KEY_EMAIL_GET_EML_SAVE_PATH tr("EML_SAVE_PATH")
#define VALUE_EMAIL_GET_EML_SAVE_PATH tr("./datatest/eml/")
#define KEY_EMAIL_GET_EML_INTERVAL_TIME tr("GET_EMAIL_INTERVAL_TIME")
#define VALUE_EMAIL_GET_EML_INTERVAL_TIME tr("600")
#define GROUP_EMAIL_GET_PROCESS tr("GET_PROCESS")
#define KEY_EMAIL_GET_FILE_SAVEPATH tr("FILE_SAVE_PATH")
#define VALUE_EMAIL_GET_FILE_SAVE_PATH tr("./datatest/mailload/")
#define KEY_EMAIL_GET_EML_SAVE_PATH tr("EML_SAVE_PATH")
#define VALUE_EMAIL_GET_EML_SAVE_PATH tr("./datatest/eml/")
#define KEY_EMAIL_GET_EML_INTERVAL_TIME tr("GET_EMAIL_INTERVAL_TIME")
#define VALUE_EMAIL_GET_EML_INTERVAL_TIME tr("1800")
#define GROUP_EMAIL_GET tr("GET_MAIL")
#define GROUP_EMAIL_GET_ONE tr("GET_MAIL_1")
#define GROUP_EMAIL_GET_TWO tr("GET_MAIL_2")
#define KEY_EMAIL_GET_USER tr("USER")
#define VALUE_EMAIL_GET_USER tr("cnndc.rn")
#define KEY_EMAIL_GET_PASSWD tr("PASSWD")
#define VALUE_EMAIL_GET_PASSWD tr("367220")
#define KEY_EMAIL_GET_SERVER tr("SERVER")
#define VALUE_EMAIL_GET_SERVER tr("192.168.10.59")
#define KEY_EMAIL_GET_PORT tr("PORT")
#define VALUE_EMAIL_GET_PORT tr("143")
typedef struct _Read_Result_
{
/* Infomations */
QString msg_type;
QString msg_id;
QString data_type;
/* Header Black */
QString designator; // designator
QString site_code; // site code
QString detector_code; // detector code
QString system_type; // system type: P for particulate; B for gas with 3-D β - γ coincidence detection; and
// G for all other gas systems (high-resolu-tion γ-spectrometry or 2-D β-γ coinci-dence detection)
QString sample_geometry; // sample geometry
QString spectrum_quantity; // spectrum qualifier: preliminary ( PREL )or full ( FULL)
QString sample_ref_id; // sample reference identification
QString measurement_id; // measurement identification
QString detector_bk_measurement_id; // detector background measurement identification
QString gas_bk_measurement_id; // gas background measurement identification (memory effect)
QString transmit_date; // transmit date (yyyy / mm / dd)
QString transmit_time; // transmit time (hh : mm : ss . s)
/* Acquisition Block */
QString acquisition_start_date; // acquisition start date (yyyy / mm / dd)
QString acquisition_start_time; // acquisition start time (hh : mm : ss . s)
double acquisition_real_time; // acquisition real time (s)
double acquisition_live_time; // acquisition live time (s)
/* Collection Block */
QString collection_start_date; // collection start date (yyyy / mm / dd)
QString collection_start_time; // collection start time (hh : mm : ss . s)
QString collection_stop_date; // collection stop date (yyyy / mm / dd)
QString collection_stop_time; // collection stop time (hh : mm : ss . s)
double air_volume; // total air volume sampled (standard cubic meters [scm])
/* Processing Block */
double sample_volume_of_Xe; // sample volume of Xe (cm 3 )
double uncertainty_1; // uncertainty (cm 3 )
double Xe_collection_yield; // Xe collection yield (Xe gas in sample/total Xe gas sampled)
double uncertainty_2; // uncertainty (Xe gas in sample/total Xe gas sampled)
QString archive_bottle_id; // archive bottle identification
/* Calibration Block */
QString date_calibration; // date of last calibration (yyyy / mm / dd)
QString time_calibration; // time of last calibration (hh : mm : ss)
/* g_Energy Block */
QVector<double> g_energy; // γ -energy (keV)
QVector<double> g_centroid_channel; // centroid channel
QVector<double> g_uncertainty; // uncertainty (channels)
int g_record_count;
/* b_Energy Block */
QVector<double> b_electron_energy; // electron energy (keV)
QVector<QString> b_decay_mode; // decay mode descriptor: B for β-particle, C for conversion electron (CE)
QVector<double> b_channel; // maximum channel of β-particle distribution or centroid channel of CE (channels)
QVector<double> b_uncertainty; // uncertainty (channels)
int b_record_count;
/* g_Resolution Block */
QVector<double> g_r_energy; // γ -energy (keV)
QVector<double> g_r_FWHM; // FWHM (keV)
QVector<double> g_r_uncertainty; // uncertainty (keV)
int g_r_record_count;
/* b_Resolution Block */
QVector<double> b_r_electron_energy; // electron energy (keV)
QVector<double> b_r_FWHM; // FWHM (keV)
QVector<double> b_r_uncertainty; // uncertainty (keV)
int b_r_record_count;
/* g_Efficiency Block */
QVector<double> g_e_energy; // γ -energy (keV)
QVector<double> g_e_efficiency; // efficiency (counts in peak/photon emitted)
QVector<double> g_e_uncertainty; // uncertainty (counts in peak/photon emitted)
int g_e_record_count;
/* ROI_Limits Block */
QVector<QString> ROI_number; // ROI number
QVector<double> POI_B_x1; // 2-D ROI β-range start, x 1 (keV)
QVector<double> POI_B_x2; // 2-D ROI β-range stop, x 2 (keV)
QVector<double> POI_G_y1; // 2-D ROI γ-range start, y 1 (keV)
QVector<double> POI_G_y2; // 2-D ROI γ-range stop, y 2 (keV)
int roi_record_count;
/* b-gEfficiency Block */
QVector<QString> bg_nuclide_name; // nuclide name
QVector<QString> bg_ROI_number; // ROI number
QVector<double> bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
QVector<double> bg_uncertainty; // uncertainty (counts in ROI/β-γ pair emitted)
int bg_record_count;
/* Ratios Block */
QVector<QString> ratio_id; // ratio identifier
QVector<QString> ROI_num_highter_G_energy_ROI; // ROI number for the higher γ -energy ROI
QVector<QString> ROI_num_lower_G_energy_ROI; // ROI number for the lower γ -energy ROI
QVector<double> count_ratio; // Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)count ratio(counts in higher γ -energy ROI/counts in lower γ -energy ROI)
QVector<double> count_ratio_uncertainty; // count ratio uncertainty (percent)
int ratio_record_count;
/* g_Spectrum Block */
long num_g_channel; // number of γ channels
long g_energy_span; // γ-energy span (keV)
long g_begin_channel; // begin of channels
QVector<long> g_counts; // count at channel
/* b_Spectrum Block */
long num_b_channel; // number of β -channels
long b_energy_span; // β -energy span (keV)
long b_begin_channel; // begin of channels
QVector<long> b_counts; // counts at channels
/* Histogram Block */
long b_channels; // β-channels
long g_channels; // γ-channels
long b_h_energy_span; // β-energy span
long g_h_energy_span; // γ-energy span
QVector<long> h_counts; // counts at channels
}ReadResult;
typedef struct _Message_Infomations_
{
/* Infomations */
QString msg_type;
QString msg_id;
QString msg_src_code;
QString ref_id_str;
QString ref_src_code;
QString seq_num;
QString tot_num;
QString product_id;
QString delivery_id;
QString data_type;
bool verify_srid;
}
MessageInfo, *PtMessageInfo;
Q_DECLARE_METATYPE(MessageInfo)
/* Commect Block */
typedef QString CommentBlock;
Q_DECLARE_METATYPE(CommentBlock)
namespace RadionuclideData
{
enum AnalyseDataType
{
InvalidData,
GammaAnalyseData,
BetaGammaAnalyseData
};
typedef struct _Header_Block_
{
/* Header Black */
QString designator; // designator
QString site_code; // site code
QString detector_code; // detector code
QString system_type; // system type: P for particulate; B for gas with 3-D β - γ coincidence detection; and
// G for all other gas systems (high-resolu-tion γ-spectrometry or 2-D β-γ coinci-dence detection)
QString sample_geometry; // sample geometry
QString spectrum_quantity; // spectrum qualifier: preliminary ( PREL )or full ( FULL)
QString sample_ref_id; // sample reference identification
QString measurement_id; // measurement identification
QString detector_bk_measurement_id; // detector background measurement identification
QString gas_bk_measurement_id; // gas background measurement identification (memory effect)
QString transmit_date; // transmit date (yyyy / mm / dd)
QString transmit_time; // transmit time (hh : mm : ss . s)
}
HeaderBlock, *PtHeaderBlock;
typedef struct _Acquisition_Block_
{
/* Acquisition Block */
QString acquisition_start_date; // acquisition start date (yyyy / mm / dd)
QString acquisition_start_time; // acquisition start time (hh : mm : ss . s)
double acquisition_real_time; // acquisition real time (s)
double acquisition_live_time; // acquisition live time (s)
}
AcquisitionBlock, *PtAcquisitionBlock;
typedef struct _Collection_Block_
{
/* Collection Block */
QString collection_start_date; // collection start date (yyyy / mm / dd)
QString collection_start_time; // collection start time (hh : mm : ss . s)
QString collection_stop_date; // collection stop date (yyyy / mm / dd)
QString collection_stop_time; // collection stop time (hh : mm : ss . s)
double air_volume; // total air volume sampled (standard cubic meters [scm])
}
CollectionBlock, *PtCollectionBlock;
typedef struct _Processing_Block_
{
/* Processing Block */
double sample_volume_of_Xe; // sample volume of Xe (cm 3 )
double uncertainty_1; // uncertainty (cm 3 )
double Xe_collection_yield; // Xe collection yield (Xe gas in sample/total Xe gas sampled)
double uncertainty_2; // uncertainty (Xe gas in sample/total Xe gas sampled)
QString archive_bottle_id; // archive bottle identification
}
ProcessingBlock, *PtProcessingBlock;
typedef struct _Sample_Block_
{
/* Sample Block */
double dimension_1;
double dimension_2;
}
SampleBlock, *PtSampleBlock;
typedef struct _Calibration_Block_
{
/* Calibration Block */
QString date_calibration; // date of last calibration (yyyy / mm / dd)
QString time_calibration; // time of last calibration (hh : mm : ss)
}
CalibrationBlock, *PtCalibrationBlock;
typedef struct _g_Energy_Block_
{
/* g_Energy Block */
QVector<double> g_energy; // γ -energy (keV)
QVector<double> centroid_channel; // centroid channel
QVector<double> uncertainty; // uncertainty (channels)
int record_count;
}
G_EnergyBlock, *PtG_EnergyBlock;
typedef struct _b_Energy_Block_
{
/* b_Energy Block */
QVector<double> electron_energy; // electron energy (keV)
QVector<QString> decay_mode; // decay mode descriptor: B for β-particle, C for conversion electron (CE)
QVector<double> channel; // maximum channel of β-particle distribution or centroid channel of CE (channels)
QVector<double> uncertainty; // uncertainty (channels)
int record_count;
}
B_EnergyBlock, *PtB_EnergyBlock;
typedef struct _g_Resolution_Block_
{
/* g_Resolution Block */
QVector<double> g_energy; // γ -energy (keV)
QVector<double> FWHM; // FWHM (keV)
QVector<double> uncertainty; // uncertainty (keV)
int record_count;
}
G_ResolutionBlock, *PtG_ResolutionBlock;
typedef struct _b_Resolution_Block_
{
/* b_Resolution Block */
QVector<double> electron_energy; // electron energy (keV)
QVector<double> FWHM; // FWHM (keV)
QVector<double> uncertainty; // uncertainty (keV)
int record_count;
}
B_ResolutionBlock, *PtB_ResolutionBlock;
typedef struct _g_Efficiency_Block_
{
/* g_Efficiency Block */
QVector<double> g_energy; // γ -energy (keV)
QVector<double> efficiency; // efficiency (counts in peak/photon emitted)
QVector<double> uncertainty; // uncertainty (counts in peak/photon emitted)
int record_count;
}
G_EfficiencyBlock, *PtG_EfficiencyBlock;
typedef struct _n_g_Efficiency_Block_
{
/* g_Efficiency Block */
QVector<QString> dev_name;
QVector<double> g_energy; // γ -energy (keV)
QVector<double> efficiency; // efficiency (counts in peak/photon emitted)
QVector<double> uncertainty; // uncertainty (counts in peak/photon emitted)
int record_count;
}
n_G_EfficiencyBlock, *Pt_n_G_EfficiencyBlock;
2024-06-04 15:25:02 +08:00
typedef struct _ROI_Limits_Block_
{
/* ROI_Limits Block */
QVector<QString> ROI_number; // ROI number
QVector<double> POI_B_x1; // 2-D ROI β-range start, x 1 (keV)
QVector<double> POI_B_x2; // 2-D ROI β-range stop, x 2 (keV)
QVector<double> POI_G_y1; // 2-D ROI γ-range start, y 1 (keV)
QVector<double> POI_G_y2; // 2-D ROI γ-range stop, y 2 (keV)
int record_count;
}
ROI_LimitsBlock, *PtROI_LimitsBlock;
typedef struct _BG_Efficiency_Block_
{
/* b-gEfficiency Block */
QVector<QString> nuclide_name; // nuclide name
QVector<QString> ROI_number; // ROI number
QVector<double> bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
QVector<double> uncertainty; // uncertainty (counts in ROI/β-γ pair emitted)
int record_count;
}
BG_EfficiencyBlock, *PtBG_EfficiencyBlock;
typedef struct _N_BG_Efficiency_Block_
{
/* b-gEfficiency Block */
QVector<QString> nuclide_name; // nuclide name
QVector<double> bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
QVector<double> uncertainty; // uncertainty (counts in ROI/β-γ pair emitted)
int record_count;
}
NBG_EfficiencyBlock, *PtNBG_EfficiencyBlock;
2024-06-04 15:25:02 +08:00
typedef struct _Totaleff_Block_
{
/* Totaleff Block */
QVector<double> g_energy; // γ-energy (keV)
QVector<double> total_efficiency; // total efficiency (counts/photon emitted)
QVector<double> uncertainty; // uncertainty (counts/photon emitted)
int record_count;
}
TotaleffBlock, *PtTotaleffBlock;
typedef struct _Ratios_Block_
{
/* Ratios Block */
QVector<QString> ratio_id; // ratio identifier
QVector<QString> ROI_num_highter_G_energy_ROI; // ROI number for the higher γ -energy ROI
QVector<QString> ROI_num_lower_G_energy_ROI; // ROI number for the lower γ -energy ROI
QVector<double> count_ratio; // Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)count ratio(counts in higher γ -energy ROI/counts in lower γ -energy ROI)
QVector<double> count_ratio_uncertainty; // count ratio uncertainty (percent)
int record_count;
}
RatiosBlock, *PtRatiosBlock;
typedef struct _G_Spectrum_Block_
{
/* g_Spectrum Block */
long num_g_channel; // number of γ channels
long g_energy_span; // γ-energy span (keV)
long begin_channel; // begin of channels
QVector<long> counts; // count at channel
//Add By XYL 20170721
_G_Spectrum_Block_()
{
num_g_channel = 0;
g_energy_span = 0;
begin_channel = 0;
}
}
G_SpectrumBlock, *PtG_SpectrumBlock;
typedef struct _B_Spectrum_Block_
{
/* b_Spectrum Block */
long num_b_channel; // number of β -channels
long b_energy_span; // β -energy span (keV)
long begin_channel; // begin of channels
QVector<long> counts; // counts at channels
}
B_SpectrumBlock, *PtB_SpectrumBlock;
typedef struct _Histogram_Block_
{
/* Histogram Block */
long b_channels; // β-channels
long g_channels; // γ-channels
long b_energy_span; // β-energy span
long g_energy_span; // γ-energy span
QVector<long> counts; // counts at channels
}
HistogramBlock, *PtHistogramBlock;
typedef struct _Certificate_Block_
{
/* Certificate Block */
double total_source_activity; // total source activity (Bq)
QString assay_date; // assay date (yyyy / mm / dd)
QString assay_time; // assay time (hh : mm : ss)
QString units_activity; // units of activity: “B,” “b” for Bq or “[blank]”; if nothing, then “B” is assigned
QVector<QString> nuclide_name; // nuclide name
QVector<QString> half_life_time; // half-life in seconds, hours, days, or years
QVector<QString> time_unit; // time unit(Y, D, H, S)
QVector<double> activity_nuclide_time_assay;// activity of nuclide at time of assay
QVector<double> uncertainty; // uncertainty (%)
QVector<double> g_energy; // γ-energy (keV)
QVector<double> g_intensity; // γ-intensity (percent)
QVector<QString> electron_decay_mode; // electron decay mode descriptor: B for β particle or C for conversion electron (CE), 0 for none (that is, γ-only source)
QVector<double> maximum_energy; // maximum β-particle energy or CE energy (keV)
QVector<double> intensity_b_particle; // intensity of β-particle (percent)
int record_count;
//Add By XYL 20170721
_Certificate_Block_()
{
total_source_activity = 0;
record_count = 0;
}
}
CertificateBlock, *PtCertificateBlock;
typedef struct _b_self_Attenuation_block_
{
/* b_self_Attenuation Block */
QVector<QString> devNames;
QVector<std::array<double, 3>> xenon;
QVector<std::array<double, 3>> nitrogen;
}
BSelfAttenuationBlock, *PtBSelfAttenuationBlock;
typedef struct _Gps_Block_
{
/* gps Block */
double lon; // 经度
double lat; // 纬度
}
GpsBlock, *PtGpsBlock;
2024-06-04 15:25:02 +08:00
}
Q_DECLARE_METATYPE(RadionuclideData::HeaderBlock)
Q_DECLARE_METATYPE(RadionuclideData::AcquisitionBlock)
Q_DECLARE_METATYPE(RadionuclideData::CollectionBlock)
Q_DECLARE_METATYPE(RadionuclideData::ProcessingBlock)
Q_DECLARE_METATYPE(RadionuclideData::SampleBlock)
Q_DECLARE_METATYPE(RadionuclideData::CalibrationBlock)
Q_DECLARE_METATYPE(RadionuclideData::G_EnergyBlock)
Q_DECLARE_METATYPE(RadionuclideData::B_EnergyBlock)
Q_DECLARE_METATYPE(RadionuclideData::G_ResolutionBlock)
Q_DECLARE_METATYPE(RadionuclideData::B_ResolutionBlock)
Q_DECLARE_METATYPE(RadionuclideData::G_EfficiencyBlock)
Q_DECLARE_METATYPE(RadionuclideData::n_G_EfficiencyBlock)
2024-06-04 15:25:02 +08:00
Q_DECLARE_METATYPE(RadionuclideData::ROI_LimitsBlock)
Q_DECLARE_METATYPE(RadionuclideData::BG_EfficiencyBlock)
Q_DECLARE_METATYPE(RadionuclideData::NBG_EfficiencyBlock)
2024-06-04 15:25:02 +08:00
Q_DECLARE_METATYPE(RadionuclideData::TotaleffBlock)
Q_DECLARE_METATYPE(RadionuclideData::RatiosBlock)
Q_DECLARE_METATYPE(RadionuclideData::G_SpectrumBlock)
Q_DECLARE_METATYPE(RadionuclideData::B_SpectrumBlock)
Q_DECLARE_METATYPE(RadionuclideData::HistogramBlock)
Q_DECLARE_METATYPE(RadionuclideData::CertificateBlock)
Q_DECLARE_METATYPE(RadionuclideData::BSelfAttenuationBlock)
Q_DECLARE_METATYPE(RadionuclideData::GpsBlock)
2024-06-04 15:25:02 +08:00
namespace MetData
{
typedef QString MetDataStationCode; // station code
typedef struct _Met_Data_Item_
{
QString met_start_date; // met start date (yyyy/mm/dd)
QString met_start_time; // met start time (hh:mm:ss)
QString met_end_date; // met end date (yyyy/mm/dd)
QString met_end_time; // met end time (hh:mm:ss)
double average_outside_temperature; // average outside temperature (°C)
int average_wind_direction; // average wind-direction (degrees from north)
double average_wind_speed; // average wind-speed (m/s)
double average_barometric_reading; // average barometric reading (hPa)
int humidity; // average relative humidity (percent relative humidity)
double rainfall; // rainfall (mm)
}
MetDataItem, *PtMetDataItem;
}
Q_DECLARE_METATYPE(MetData::MetDataItem)
namespace RMSSOHData
{
typedef struct _Header_Block_
{
/* Header block */
QString designator; // designator
QString station_code; // station code
QString detector_code; // detector code or NA if 1) there is more than one detector or 2) data are from the sam-pling site of a split station
QString start_date; // SOH data sampling period start date (yyyy/mm/dd)
QString start_time; // SOH data sampling period start time (hh:mm:ss)
QString end_date; // SOH data sampling period end date (yyyy/mm/dd)
QString end_time; // SOH data sampling period end time (hh:mm:ss)
QString transmit_date; // transmit date (yyyy/mm/dd)
QString transmit_time; // transmit time (hh:mm:ss)
}
HeaderBlock, *PtHeaderBlock;
typedef struct _Air_Sampler_Flow_Block_
{
/* Air Sampler Flow block */
QVector<double> average_flow_rate; // average flow rate (standard cubic metersper hour (scm/h))
QVector<double> flow_rate_standard_deviation; // flow rate standard deviation (scm/h)
QVector<QString> start_date; // SOH data sampling interval start date (yyyy/mm/dd)
QVector<QString> start_time; // SOH data sampling interval start time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
AirSamplerFlowBlock, *PtAirSamplerFlowBlock;
typedef struct _Air_Sampler_Env_Block_
{
/* Air Sampler Env block */
QVector<double> temperature; // average air temperature after filter (°C)
QVector<double> pressure; // average static air pressure after filter (hPa)
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
AirSamplerEnvBlock, *PtAirSamplerEnvBlock;
typedef struct _Det_Env_Block_
{
/* Det Env block */
QVector<double> room_temperature; // average room temperature (°C)
QVector<QString> detector_shield_status; // detector shield status (OPEN or CLOSED)
QVector<short> humidity; // average room humidity (in percent relative humidity)
QVector<long> voltage; // detector high voltage (V)
QVector<long> crystal_temperature; // average crystal temperature (°C)
QVector<QString> electric_cooler_status; // electric cooler status (ON or OFF)
QVector<double> fill_fraction; // liquid nitrogen fill-fraction
QVector<double> leakage; // detector leakage current (nanoamperes [nA])
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
DetEnvBlock, *PtDetEnvBlock;
typedef struct _NIMBIN_Block_
{
/* NIMBIN block */
QVector<QString> flag; // +/-
QVector<short> voltage; // average NIMBIN voltage (V)
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
NIMBIN_Block, *PtNIMBIN_Block;
typedef struct _Power_Supply_Block_
{
/* Power Supply block */
QVector<QString> MAIN; // MAIN (for MAIN power supply)
QVector<QString> main_power_status; // status of main power supply (ON/OFF)
QVector<QString> AUX; // AUX (for AUXiliary power supply)
QVector<QString> aux_power_status; // status of auxiliary power supply (ON/OFF)
QVector<QString> UPS; // UPS (for Uninterrupted Power Supply)
QVector<QString> ups_status; // status of uninterruptedly power supply (ON/ OFF)
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
PowerSupplyBlock, *PtPowerSupplyBlock;
typedef struct _Equip_Status_Block_
{
/* Equip Status block */
QVector<QString> C_value; // status of sampling system (ON/OFF) or the SRID of the sample being collected
QVector<QString> P_value; // status of sample preparation, processing, or decay (ON/OFF) or the SRID of the sample being processed or decayed
QVector<QString> A_value; // status of detector system (ON/OFF) or the SRID of the sample being counted
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
EquipStatusBlock, *PtEquipStatusBlock;
typedef struct _Tamper_Env_Block_
{
/* Tamper Env block */
QVector<QString> tamper_sensor_name; // tamper sensor name
QVector<QString> tamper_sensor_status; // tamper sensor status (OPEN or CLOSED)
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> interval_duration; // SOH data sampling interval duration (s)
int record_count;
}
TamperEnvBlock, *PtTamperEnvBlock;
typedef struct _Process_Sensors_Block_
{
/* Process Sensors block */
QVector<QString> sensor_type; // sensor type (TEMP, PRESSURE,PROCESSFLOW, VOLTAGE, COUN-TRATES, DEWPOINT, CO2VOLUME)
QVector<QString> sensor_name; // tamper sensor status (OPEN or CLOSED)
QVector<double> sensor_reading; // sensor reading (TEMP in °C, PRESSURE in Pa, PROCESSFLOW in m3/h, VOLT-AGE in V, COUNTRATE in counts/s, DEWPOINT in °C, CO2VOLUME in cm3)
QVector<QString> date; // date (yyyy/mm/dd)
QVector<QString> time; // time (hh:mm:ss)
QVector<long> duration; // SOH duration (s)
int record_count;
}
ProcessSensorsBlock, *PtProcessSensorsBlock;
typedef struct _Chromatogram_Block_
{
/* Chromatogram block */
QString srid; // the SRID of the sample being counted
QVector<long> interval_number; // interval number (starts at 1)
QVector<long> interval_start_channel; // interval start channel
QVector<double> duration; // duration between chromatogram readings (in seconds [s])
int interval_record_count;
long total_number; // total number of chromatogram readings
QVector<long> detector_response; // detector response
}
ChromatogramBlock, *PtChromatogramBlock;
}
Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)
Q_DECLARE_METATYPE(RMSSOHData::AirSamplerFlowBlock)
Q_DECLARE_METATYPE(RMSSOHData::AirSamplerEnvBlock)
Q_DECLARE_METATYPE(RMSSOHData::DetEnvBlock)
Q_DECLARE_METATYPE(RMSSOHData::NIMBIN_Block)
Q_DECLARE_METATYPE(RMSSOHData::PowerSupplyBlock)
Q_DECLARE_METATYPE(RMSSOHData::EquipStatusBlock)
Q_DECLARE_METATYPE(RMSSOHData::TamperEnvBlock)
Q_DECLARE_METATYPE(RMSSOHData::ProcessSensorsBlock)
Q_DECLARE_METATYPE(RMSSOHData::ChromatogramBlock)
namespace AlertData
{
typedef QString AlertsDescribe;
typedef struct _Alerts_Info_
{
QString station_code;
QString alert_type;
QString date;
QString time;
AlertsDescribe desc;
}
AlertsInfo, *PtAlertsInfo;
}
Q_DECLARE_METATYPE(AlertData::AlertsInfo)
#endif // DATA_MANAGE_DEFINE_H