UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dba_ldb_seismic.hpp
1 /* dba_ldb_seismic.hpp */
2 /* $Id$ */
3 #ifndef __dba_ldb_seismic_hpp
4 #define __dba_ldb_seismic_hpp
5 
6 #include <vector>
7 #include <string>
8 #include <mix/trselect.h>
9 #include <s2proc/dba_seismic.hpp>
10 
12 namespace dba
13 {
15  class LdbSeismic : public Seismic
16  {
17  public:
18 
21  {
22  OPEN_MODE = 0,
25  };
26 
27  /*
28  * Constructors
29  */
30 
32  LdbSeismic(const std::string &project_str,
33  const std::string &name_str,
34  const AccessMode access_mode = OPEN_MODE,
35  TrMtable *mt = NULL );
36 
38  virtual ~LdbSeismic();
39 
41  virtual Seismic* clone() const;
42 
44  void close();
45 
46 
47  /*
48  * Main seiemic attributes
49  */
50 
52  virtual unsigned int getSamplesNum() const;
53 
55  virtual Trace::TimeT getTimeStep() const;
56 
58  virtual Trace::TimeT getT0() const;
59 
60  /*
61  * Access to traces
62  */
63 
65  virtual unsigned int getTracesNum() const;
66 
69  virtual bool getTrace(unsigned int id, Trace &tr) const;
70 
73  virtual bool getHeader(unsigned int id, Trace::Header &hdr) const;
74 
75  /*
76  * Access to indexies
77  */
78 
80  virtual bool getIndexies(const Trace::Header::AttrId &hdr_attr,
81  std::set<int> &ids) const;
82 
83  /*
84  * Sorting
85  */
86 
88  virtual void appendRule(const SortingRuleType type,
89  const Trace::Header::AttrId &hdr_attr) const;
90 
92  virtual void appendRule(const MatchingRuleType type,
93  const Trace::Header::AttrId &hdr_attr,
94  const int id) const;
95 
97  virtual void resetRules() const;
98 
99  /*
100  * Editing
101  */
102 
104  virtual bool appendTrace(const Trace &tr);
105 
109  virtual bool setTrace(unsigned int id, Trace &tr);
110 
114  TrSet* getTrSetPtr();
115 
116  protected:
117 
120 
122  mutable std::vector<TsInclRule> m_matching_rules_vec;
123 
125  mutable std::vector<TsSortRule> m_sorting_rules_vec;
126 
128  void ldb2hdr(const TrHeader &ldb_hdr, Trace::Header &hdr) const;
129 
131  void update_ldb_header(const Trace &tr, TrHeader &ldb_hdr) const;
132 
134  bool hdrAttr2name(const Trace::Header::AttrId &attr_id, TraceAttrId &ldb_attr_id) const;
135 
137  bool select() const;
138 
140  bool get_ldb_trace(unsigned int id, Trace &tr) const;
141 
143  bool get_ldb_header(unsigned int id, Trace::Header &hdr) const;
144 
146  bool set_ldb_trace(unsigned int id, Trace &tr);
147 
149  mutable bool m_selection_changed_flag;
150 
151  private:
152 
154  void open_seismic(const std::string &project_str,
155  const std::string &name_str,
156  const AccessMode access_mode,
157  TrMtable *mt);
158  };
159 }; // dba
160 
161 #endif /* dba_ldb_seismic.hpp */
bool set_ldb_trace(unsigned int id, Trace &tr)
Definition: dba_ldb_seismic.hpp:23
virtual Seismic * clone() const
bool hdrAttr2name(const Trace::Header::AttrId &attr_id, TraceAttrId &ldb_attr_id) const
LdbSeismic(const std::string &project_str, const std::string &name_str, const AccessMode access_mode=OPEN_MODE, TrMtable *mt=NULL)
float TimeT
Definition: trace.hpp:22
Definition: trace_file.h:15
virtual bool appendTrace(const Trace &tr)
virtual bool getHeader(unsigned int id, Trace::Header &hdr) const
virtual bool getIndexies(const Trace::Header::AttrId &hdr_attr, std::set< int > &ids) const
virtual void resetRules() const
std::vector< TsInclRule > m_matching_rules_vec
Definition: dba_ldb_seismic.hpp:122
Definition: dba_ldb_seismic.hpp:22
virtual unsigned int getSamplesNum() const
virtual bool getTrace(unsigned int id, Trace &tr) const
Definition: dba_ldb_seismic.hpp:24
virtual unsigned int getTracesNum() const
bool get_ldb_trace(unsigned int id, Trace &tr) const
bool get_ldb_header(unsigned int id, Trace::Header &hdr) const
Definition: trace.hpp:14
virtual bool setTrace(unsigned int id, Trace &tr)
Definition: dba_ldb_seismic.hpp:15
Definition: trace.hpp:29
SortingRuleType
Definition: dba_seismic_service.hpp:16
void ldb2hdr(const TrHeader &ldb_hdr, Trace::Header &hdr) const
bool select() const
TrSet * mp_trset
Definition: dba_ldb_seismic.hpp:119
MatchingRuleType
Definition: dba_seismic_service.hpp:46
Definition: dba_seismic.hpp:19
virtual Trace::TimeT getTimeStep() const
virtual void appendRule(const SortingRuleType type, const Trace::Header::AttrId &hdr_attr) const
AccessMode
Definition: dba_ldb_seismic.hpp:20
Definition: trset.h:44
TrSet * getTrSetPtr()
Definition: trset.h:96
AttrId
Definition: trace.hpp:34
virtual Trace::TimeT getT0() const
virtual ~LdbSeismic()
void update_ldb_header(const Trace &tr, TrHeader &ldb_hdr) const