logplus/Workflow/WFEngine/IOService/include/Property.h

354 lines
15 KiB
C
Raw Normal View History

2026-01-16 17:18:41 +08:00
/**
* @file Property.h
* @brief Property类 , Project, Survey, Seis, VelModel,Grid, Job,
* VelPair, Geometry
*/
#ifndef PAI_FRAME_IOSERVICE_PROPERTY_H
#define PAI_FRAME_IOSERVICE_PROPERTY_H
#include "Turtle.h"
#include <vector>
#include <string>
#include "Const.h"
namespace pai {
namespace ios {
namespace property {
/**
* @brief Common
*/
const std::string LAST_MODIFYED = "Last Modified By";
const std::string DISK_PATH = "Disk Path";
const std::string SIZE = "Data Size";
const std::string CREATE_BY = "Creator";
const std::string CREATE_TIME = "Created";
const std::string LAST_ACCESS_TIME = "Last Accessed";
const std::string MODIFY_TIME = "Modified";
const std::string INLINE_COUNT = "Inline Count";
const std::string MAX_INLINE = "Max Inline";
const std::string MIN_INLINE = "Min Inline";
const std::string XLINE_COUNT = "Crossline Count";
const std::string MAX_XLINE = "Max Crossline";
const std::string MIN_XLINE = "Min Crossline";
const std::string INLINE_INTERVEL = "Inline Intervel";
const std::string XLINE_INTERVEL = "Crossline Intervel";
const std::string CMP_COUNT = "CMP Count";
const std::string MAX_CMP = "Max CMP";
const std::string MIN_CMP = "Min CMP";//TODO:统计了最大采样值和最小采样值
const std::string PICK_GATHERS = "Pick Gathers";
const std::string PICK_TRACE = "Pick Traces";
const std::string DATA_NAME = "Data Name";
const std::string COMMENT = "Comment";
const std::string FILE_COUNT = "File Count";///<指定文件夹下该种类型数据的个数
/**
* @brief type
*/
const std::string TYPE = "Type";
const std::string TYPE_PROJECT = "Project";
const std::string TYPE_SURVEY = "Survey";
const std::string TYPE_SEISMIC = "Data";
const std::string TYPE_GEOMETRY = "Geometry";
const std::string TYPE_GRID = "Grid";
const std::string TYPE_VELMODEL = "Vel-Model";
const std::string TYPE_VELANALYSIS = "Vel-Analysis";
const std::string TYPE_VELPAIR = "VelPair";
const std::string TYPE_FIRSTARRIVAL = "FirstArrival";
const std::string TYPE_MUTE = "Mute";
const std::string TYPE_TRACEEDIT = "TraceEdit";
const std::string TYPE_STATICS = "Statics";
const std::string TYPE_HORIZON = "Horizon";
const std::string TYPE_MODELING = "Modeling";
const std::string TYPE_ATTRIBUTE = "Attribute";
const std::string TYPE_OPERATION = "Operation";
const std::string TYPE_VELDATATYPE = "Vel Type";
const std::string TYPE_PARAMETERSETFOLDER = "Parameter Set";
const std::string TYPE_VELOCITYFOLDER = "Velocity";
const std::string TYPE_VELPAIRFOLDER = "Vel-Pairs";
const std::string TYPE_WORKFLOW = "Workflow";
const std::string TYPE_JOB = "Job";
const std::string TYPE_JOBLOG = "Log";
const std::string TYPE_GRIDPROPERTY = "Grid Property";
/**
* @brief Seis
*/
const std::string DATA_TYPE = "Data Type";
const std::string INDEX_INFO = "Index Info";
const std::string GATHER_TYPE = "Gather Type";
const std::string GATHER_COUNT = "Gather Count";
const std::string TRACE_COUNT = "Trace Count";
const std::string MAX_SHOTNO = "Max Shot_num";
const std::string Min_SHOTNO = "Min Shot_num";
const std::string RECEIVER_COUNT = "Receiver Count";///<TODO:目前没有统计这个字段
const std::string MAX_RECEIVER = "Max Receiver";///<TODO:目前没有统计这个字段
const std::string MIN_RECEIVER = "Min Receiver";///<TODO:目前没有统计这个字段
const std::string MAX_OFFSET = "Max Abs Offset";///<TODO:目前没有统计这个字段
const std::string Min_OFFSET = "Min Abs Offset";///<TODO:目前没有统计这个字段
/**
//const std::string INLINE_COUNT = "Inline Count:";//TODO:目前没有统计这个字段
//const std::string MIN_CMP = "Min CMP";//TODO:统计了最大采样值和最小采样值
*/
/**
* @brief Grid
*/
const std::string GRID_NAME = "Grid Name";
const std::string GRID_TYPE = "Grid Type";
const std::string GRID_CORNER = "Grid Corner";
const std::string P1 = "P1";
const std::string P2 = "P2";
const std::string P3 = "P3";
const std::string P4 = "P4";
const std::string CELL = "Cell";
const std::string INLINE_INCREMENT = "Inline Inc";
const std::string XLINE_INCREMENT = "Crossline Inc";
/**
* @brief Geometry
*/
const std::string SOURCE_LINE_COUNT = "Source Line Count";
const std::string SOURCE_POINT_COUNT = "Source Point Count";
const std::string RECEIVER_LINE_COUNT = "Receiver Line Count";
const std::string RECEIVER_POINT_COUNT = "Receiver Point Count";
const std::string FIELD_CHANNEL_COUNT = "Field Channel Count";
/**
* @brief VelModel
*/
const std::string VELMODEL_NAME = "VelModel Name";
const std::string VELMODEL_TYPE = "VelModel Type";
const std::string SEISMIC_DOMAIN = "Domain";
const std::string BINNING = "Binning";///<TODO:目前没有统计这个字段
/**
* @brief VelPair
*/
const std::string VELPAIR_NAME = "VelPair Name";
const std::string VELPAIR_TYPE = "VelPair Type";
/**
* @brief Job
*/
const std::string SUBMITTE_TIME = "Submite";
const std::string ELAPSED_TIME = "Elapsed";
const std::string RUNNING_TIME = "Running";
const std::string STATUS = "Status";
const std::string PRIORITY = "Priority";
const std::string JOB_NAME = "Job Name";
const std::string WORKFLOW_NAME = "Wordflow Name";
const std::string RUN = "Run";
const std::string ERRORS = "Errors";
const std::string SUBMITTED_BY = "Submitted By";
const std::string STATUS_UPDATED_TIME = "Status Update Time";
const std::string TOTAL_CPU_TIME = "Total Cpu/Gpu Time";
const std::string TRACE_IN = "Trace In";
const std::string TRACE_OUT = "Trace Out";
const std::string TRACE_DIFF = "Trace Diff";
/**
* @brief Project
*/
const std::string SURVEY_COUNT = "Survey Count";
const std::string REGION = "Region";
const std::string SIZE_OF_THE_PROJECT = "Size of the project";
/**
* @brief Survey
*/
const std::string AREA = "Area";
const std::string STANDARD = "Standard";
const std::string ACTUALPROCESSING = "Actual Processing";
const std::string SURVEY_TYPE = "Survey Type";
/**
* @brief Value
*/
const std::string VALUE_TIME = "Time";
const std::string VALUE_DEPTH = "Depth";
const std::string VELOCITY_MODEL = "Velocity model";
const std::string VALUE_STACKTYPE = "Stack"; ///<速度对叠加数据
const std::string VALUE_RMS = "RMS"; ///<速度模型均方根
/**
* @brief Horizon
*/
const std::string HORIZON_NUM = "Horizon Num";
/**
* @brief Seis_Folder
*/
const std::string TOTAL_SIZE = "Total Size";
/**
* @brief Job_Folder
*/
const std::string JOB_COUNT = "Job Count";
const std::string SUCCESS_RATE = "Success Rate";
const std::string RUNNING = "Running";
const std::string PAUSE = "Pause";
/**
* @brief Geometry_Folder
*/
const std::string GEOMETRY_COUNT = "Geometry Count";
/**
* @brief Operation
*/
const std::string OPERATION_NAME = "Operation Name";
const std::string OPERATION_TYPE = "Operation Type";
const std::string OPERATION_STARTTIME = "Start Time";
const std::string OPERATION_ENDTIME = "End Time";
const int DIGITS = 2; ///<属性的数据小数点后的精度位
/**
* @brief Item类型
*/
typedef enum
{
DATE, ///<时间
STRING, ///<string
FLOAT, ///<float
NUMBER ///<number
}ItemType;
/**
* @brief Item单位
*/
typedef PAI_IOSERVICE_EXPORT enum
{
NOUNIT,
Byte, ///<字节
KB,
MB,
GB,
TB,
PB,
g, ///<克
kg, ///<千克
MM, ///<毫米
CM, ///<厘米
M, ///< 米
KM, ///< 千米
SQUAREMETER, ///< 平方米
CUBICMETER, ///< 立方米
SQUAREKILOMETERS ///< 平方千米
}ItemUnit;
/**
* @brief
*/
typedef PAI_IOSERVICE_EXPORT enum
{
DIM2 = 2, ///< 2D
DIM3 = 3, ///< 3D
DIM4 = 4, ///< 4D
DIM5 = 5, ///< Depth
DIM6 = 6, ///< Other Rank
LAND = 10, ///< land
SEA = 11, ///< sea bed
MARINE = 12, ///< marine
TRANSITION = 13, ///<transition zone
OTHER = 14 ///< other
}SurveyType;
/**
* @brief
*/
class PAI_IOSERVICE_EXPORT PropertyItem
{
public:
PropertyItem ();
~PropertyItem ();
std::string GetPropertyName() const;
std::string GetPropertyValue() const;
ItemType GetType() const;
ItemUnit GetUnit() const;
void SetPropertyName(const std::string & PropertyName);
void SetPropertyValue(const std::string & PropertyValue);
void SetType(const ItemType Type);
void SetUnit(const ItemUnit Unit);
private:
std::string m_PropertyName; ///<属性名
std::string m_PropertyValue; ///<属性值
ItemType m_Type; ///<属性类型
ItemUnit m_Unit; ///<属性单位
};
/**
* @class Property
* @brief Project, Survey, Seis, VelModel,
* VelPair, Geometry
*/
class PAI_IOSERVICE_EXPORT Property
{
public:
/**
* @brief id
* @param[in] id ID即为数据ID
* ID即为工区ID
* @param[in] type
* @param[out] itemgroup
*/
void GetProperty (const long long id, const pai::ios::DATA_TYPE type, std::vector<std::vector<PropertyItem> > & itemgroup);
private:
void GetProjectProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetSurveyProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetSeisProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetGeometryProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetGridProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelModelProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelPairProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetFirstArrivalProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetMuteProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetTraceEditProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetStaticsProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetHorizonProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetModelingProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetOperationProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelAnalysisProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetLaterProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetShotProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetWorkflowProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetJobProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetJobLogProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetGridPropertyProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
/**
* @brief
*/
void GetWorkflowFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetSeisFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetJobFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetGridFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetGeometryFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetParamFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetFirstArrivalFolderProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetMuteFolderProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetTraceEditFolderProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetStaticsFolderProperty(const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetHorizonFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelocityFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelPairFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelModelFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetModelingFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetVelAnaFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
void GetAttributeFolderProperty (const long long id, std::vector<std::vector<PropertyItem> > & itemgroup);
std::string GetSurveyTypeString(const SurveyType& type);
void ChangeFileSizeUnit(long long size,std::string &realsize,pai::ios::property::ItemUnit & itemUnit,pai::ios::property::ItemUnit defaultUnit = Byte);
};
}
}
}
#endif