UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
udb_seis.hpp
1 /* udb_seis.hpp */
2 /* $Id: udb_seis.hpp 21467 2012-02-03 15:33:40Z urij $ */
3 #ifndef __udb_seis_hpp
4 #define __udb_seis_hpp
5 
6 #include <s2proc/wave_field.hpp>
7 #include <mix/trselect.h>
8 #include <string>
9 #include <set>
10 #include <utility>
11 
13 class UDBSeis
14 {
15 public:
16 
18  typedef std::pair<size_t, size_t> Ranges;
19 
21  enum OSType
22  {
23  CMP=0, // common middle points
24  CSP, // common source points
25  CRP, // common receiver points
26  NMGL, // uniq magnitograms
27  EQL // equal offsets
28  };
29 
31  struct Type
32  {
33  Type() {
34  comp = 'X', nmgl = 0; os_type = NMGL; L=0;
35  use_na_trs = false; min_traces_num = -1;
36  }
37  char comp;
38  int nmgl;
39  Int4 L;
41  bool use_na_trs;
46  };
47 
50  UDBSeis();
51 
53  virtual ~UDBSeis();
54 
56  bool dbFill(const char *project, const char *name);
57 
59  bool setSeisType(const Type &type);
60 
62  Type getSeisType() const {return m_seis_type;}
63 
65  void close();
66 
67 
69  int getComps(std::vector<char> &comps);
70 
73  int getMagnitograms(std::vector<int> &nmgls);
74 
76  int getOffsets(std::vector<int> &offsets);
77 
78 
84  bool getWavefield(WaveField &wf, Ranges *pranges = 0x0) const;
85 
87  bool getWavefieldSize(int &wf_size) const;
88 
90  bool getCoords(int &ix, int &iy,
91  double &ixl, double &iyl, double &izl ) const;
92 
93 
95  int getSamplesCount() const;
96 
98  double getTbeg() const;
99 
101  double getTend() const;
102 
104  double getTimeStep() const;
105 
106 
108  std::string getModName() {return m_mod_name;}
109 
110 
112  bool getWavefieldHeaders(TrHeader *&headers) const;
113 
115  TrSet& getTrSet(){return *m_ptrset;}
116 
117 
119  void addHdrAttr(Trace::Header::AttrId id){m_hdr_attrs_set.insert(id);}
120 
122  void clearHdrAttrsList() {m_hdr_attrs_set.clear();}
123 
124 protected:
125 
128 
130  std::string m_mod_name;
131 
134 
137 
139  std::set<Trace::Header::AttrId> m_hdr_attrs_set;
140 
141  ErrCode make_it(const Type &type, TrSet *trset, int id1, int id2, TrIndexTable &it);
142 };
143 
144 #endif /* udb_seis.hpp */
bool use_na_trs
Definition: udb_seis.hpp:41
bool getWavefieldSize(int &wf_size) const
Type getSeisType() const
Definition: udb_seis.hpp:62
Definition: trace_file.h:15
void clearHdrAttrsList()
Definition: udb_seis.hpp:122
double getTimeStep() const
bool getWavefieldHeaders(TrHeader *&headers) const
virtual ~UDBSeis()
bool dbFill(const char *project, const char *name)
TrSet & getTrSet()
Definition: udb_seis.hpp:115
int nmgl
Definition: udb_seis.hpp:38
int getMagnitograms(std::vector< int > &nmgls)
double getTend() const
int getSamplesCount() const
void close()
double getTbeg() const
std::string getModName()
Definition: udb_seis.hpp:108
Ranges m_ids_ranges
Definition: udb_seis.hpp:136
OSType os_type
Definition: udb_seis.hpp:40
bool setSeisType(const Type &type)
Definition: wave_field.hpp:13
Definition: udb_seis.hpp:31
char comp
Definition: udb_seis.hpp:37
Definition: trset.h:56
Type m_seis_type
Definition: udb_seis.hpp:133
bool getCoords(int &ix, int &iy, double &ixl, double &iyl, double &izl) const
bool getWavefield(WaveField &wf, Ranges *pranges=0x0) const
int min_traces_num
Definition: udb_seis.hpp:42
OSType
Definition: udb_seis.hpp:21
Int4 L
Definition: udb_seis.hpp:39
void addHdrAttr(Trace::Header::AttrId id)
Definition: udb_seis.hpp:119
std::string m_mod_name
Definition: udb_seis.hpp:130
std::pair< size_t, size_t > Ranges
Definition: udb_seis.hpp:18
int getOffsets(std::vector< int > &offsets)
TrSet * m_ptrset
Definition: udb_seis.hpp:127
Definition: udb_seis.hpp:13
Definition: trset.h:96
int getComps(std::vector< char > &comps)
AttrId
Definition: trace.hpp:34