UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
s2_ldb.hpp
1 /* s2_ldb.hpp */
2 /* $Id: s2_ldb.hpp 21619 2012-05-24 10:12:07Z hoot $ */
3 #ifndef __s2_ldb_hpp
4 #define __s2_ldb_hpp
5 
6 #include <ldb/trset.h>
7 #include <ldb/dbtools.h>
8 
9 #include <mix/trselect.h>
10 #include <s2proc/s2_reflsim.hpp>
11 #include <s2proc/udb_seis.hpp>
12 #include <s2proc/u_abs_hod.hpp>
13 #include <s2proc/fb_weight.hpp>
14 #include <s2proc/polycor.hpp>
15 
16 namespace S2LDB
17 {
18  void load_magnitogram(int nmgl_id, TrSet &trset, TrIndexTable &NMGLSet, WaveField &field, int &nmgl);
19 
20  void save_magnitogram(const WaveField& field, TrSet& itrset, TrSet& otrset);
21 
23  bool create_magnitogram(const std::string &f_name, const WaveField &wf);
24 
25 
27  bool load_kinparams(dbItem &kin_dbi, std::vector<S2ReflSim::KinParams> &kps);
28 
29 
32  bool save_kinparams(std::vector<S2ReflSim::KinParams> &kps, dbItem &kin_dbi,
33  dbNameStruct &kin_dbns, bool is_rewrite);
34 
35  bool load_hodograph(UAbstractHod& a_hod, dbItem &dbhod);
36 
37  bool save_hodograph(UHod& hd, dbItem &dbhod, bool rewrite);
38 
39 
41  bool load_fb_weights(dbItem &dbhod, FBW_Ar &fbw_ar);
42 
43  bool save_fb_weights(const FBW_Ar &fbw_ar, dbItem &dbhod, bool rewrite);
44 
45 
46  /* Save calculated by S2PolyStat, CMPPolycor statics in data base*/
47  bool SaveStatic(TrSet *inTr,
48  dbItem &StTable,
49  const char* mod_name,
50  PSC::Statics stat_val,
51  PSC::Direction dir,
52  bool rewrite,
53  int *db_line);
54 
55  bool SaveStatic(TrSet *inTr,
56  dbItem &RecvStTable, const std::vector<double> &t_abs_RP, const std::vector<int> &rp_id,
57  dbItem &ShotStTable, const std::vector<double> &t_abs_SP, const std::vector<int> &sp_id,
58  bool rewrite);
59 };
60 
63 {
64 public:
65 
68  S2ReflKinLDB(const dbItem &db_item);
69 
71  virtual ~S2ReflKinLDB();
72 
74  void setApriorityDbTable(const dbItem &db_item_apr) {m_db_item_apr = db_item_apr;}
75 
77  bool save(const std::vector<S2ReflSim::KinParams> &kps,
78  int *saved_db_line = 0x0);
79 
81  bool load(std::vector<S2ReflSim::KinParams> &kps);
82 
84  bool save(const std::vector<S2ReflSim::AprItem> &apr);
85 
87  bool load(std::vector<S2ReflSim::AprItem> &apr);
88 
91 
93  void setOSType(UDBSeis::OSType os_type) {m_os_type = os_type;}
94 
96  bool& isRewrite() {return m_is_rewrite;}
97 
99  void setName(const std::string &name) {m_name = name;}
100 
102  std::string getName() const {return m_name;}
103 
105  void setApriorityName(const std::string &name) {m_name_apr = name;}
106 
108  std::string getApriorityName() const {return m_name_apr;}
109 
110 protected:
111 
114 
117 
120 
123 
125  std::string m_name;
126 
128  std::string m_name_apr;
129 };
130 
131 #endif /* s2_ldb.hpp */
void setName(const std::string &name)
Definition: s2_ldb.hpp:99
virtual ~S2ReflKinLDB()
Definition: dbnamedefs.h:67
dbItem m_db_item_apr
Definition: s2_ldb.hpp:116
bool & isRewrite()
Definition: s2_ldb.hpp:96
Definition: s2_ldb.hpp:62
bool load(std::vector< S2ReflSim::KinParams > &kps)
S2ReflKinLDB(const dbItem &db_item)
UDBSeis::OSType m_os_type
Definition: s2_ldb.hpp:122
void setApriorityDbTable(const dbItem &db_item_apr)
Definition: s2_ldb.hpp:74
Definition: wave_field.hpp:13
UDBSeis::OSType getOSType() const
Definition: s2_ldb.hpp:90
Definition: trset.h:56
dbItem m_db_item
Definition: s2_ldb.hpp:113
std::string getApriorityName() const
Definition: s2_ldb.hpp:108
void setOSType(UDBSeis::OSType os_type)
Definition: s2_ldb.hpp:93
std::string m_name
Definition: s2_ldb.hpp:125
bool m_is_rewrite
Definition: s2_ldb.hpp:119
Definition: u_abs_hod.hpp:72
std::string getName() const
Definition: s2_ldb.hpp:102
OSType
Definition: udb_seis.hpp:21
bool save(const std::vector< S2ReflSim::KinParams > &kps, int *saved_db_line=0x0)
void setApriorityName(const std::string &name)
Definition: s2_ldb.hpp:105
std::string m_name_apr
Definition: s2_ldb.hpp:128
Definition: dbnamedefs.h:85
Definition: trset.h:96