UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
s2_ldb_access.hpp
1 /* s2_ldb_access.hpp */
2 /* $Id$ */
3 #ifndef __s2_ldb_access_hpp
4 #define __s2_ldb_access_hpp
5 
6 #include <s2proc/s2_abstract_db_access.hpp>
7 #include <mix/trselect.h>
8 
11 {
12 public:
13 
15  S2LDBAccess(TrSet &trset);
16 
18  virtual ~S2LDBAccess();
19 
21  virtual S2AbstractDBAccess* clone() const {return new S2LDBAccess(*this);}
22 
23 
25  virtual int getSamplesNum() const;
26 
28  virtual Trace::TimeT getTimeStep() const;
29 
30 
32  virtual int getTracesNum() const;
33 
35  virtual bool getTrace(int id, Trace &tr) const;
36 
37 
40  virtual bool getWaveField(const Trace::Header::AttrId &attr,
41  int id,
42  WaveField &wf) const;
43 
46  virtual bool getWaveField(PointType ptype,
47  int id1,
48  int id2,
49  WaveField &wf) const;
50 
53  virtual bool getWaveField(PointType3 ptype,
54  int id1,
55  int id2,
56  int id3,
57  WaveField &wf) const;
58 
59 
62  virtual bool getWaveField(int nsl, int nss, int nrl, int nrs, WaveField &wf) const;
63 
64 
66  virtual bool getShotsIds(std::set<int> &ids) const;
67 
69  virtual bool getRecvsIds(std::set<int> &ids) const;
70 
72  virtual bool getCMPsIds(std::set<int> &ids) const;
73 
75  virtual bool getLIds(std::set<int> &ids) const;
76 
78  virtual bool getCompsIds(std::set<int> &ids) const;
79 
81  virtual bool getShotLinesIds(std::set<int> &ids) const;
82 
84  virtual bool getShotsOnLineIds(int line_id, std::set<int> &ids) const;
85 
87  virtual bool getRecvLinesIds(std::set<int> &ids) const;
88 
90  virtual bool getRecvsOnLineIds(int line_id, std::set<int> &ids) const;
91 
93  virtual bool getPSCStrides(std::set<int> &strides) const;
94 
96  virtual bool getPSCDirs(std::set<int> &dirs) const;
97 
98 
100  virtual bool appendTrace(const Trace &tr);
101 
102 protected:
103 
106 
107 private:
108 
109  struct P2D
110  {
111  P2D(int i_id1, int i_id2) : id1(i_id1), id2(i_id2) {}
112 
113  int id1;
114  int id2;
115 
116  bool operator<(const P2D &other) const;
117  bool operator==(const P2D &other) const;
118  };
119 
120  typedef std::multimap<P2D, int> P2DMap;
121  P2DMap m_p2d_sp_rp_map;
122  P2DMap m_p2d_sp_dp_map;
123  P2DMap m_p2d_rp_dp_map;
124  P2DMap m_p2d_sp_L_map;
125  P2DMap m_p2d_rp_L_map;
126 
127  void make_p2d_map(TrSet &trset, PointType ptype, P2DMap &p2d_map);
128 
129  bool get_seismogram(PointType ptype, int comp_id, int id, WaveField &wf) const;
130 };
131 
132 #endif /* s2_ldb_access.hpp */
virtual ~S2LDBAccess()
float TimeT
Definition: trace.hpp:22
virtual bool getShotLinesIds(std::set< int > &ids) const
PointType
Definition: s2_abstract_db_access.hpp:20
Definition: s2_abstract_db_access.hpp:15
virtual S2AbstractDBAccess * clone() const
Definition: s2_ldb_access.hpp:21
virtual bool getTrace(int id, Trace &tr) const
virtual bool getLIds(std::set< int > &ids) const
virtual bool getShotsOnLineIds(int line_id, std::set< int > &ids) const
virtual bool getShotsIds(std::set< int > &ids) const
virtual bool getWaveField(const Trace::Header::AttrId &attr, int id, WaveField &wf) const
virtual bool getCMPsIds(std::set< int > &ids) const
Definition: wave_field.hpp:13
virtual bool appendTrace(const Trace &tr)
PointType3
Definition: s2_abstract_db_access.hpp:36
Definition: trace.hpp:14
virtual bool getPSCDirs(std::set< int > &dirs) const
virtual int getSamplesNum() const
virtual bool getRecvLinesIds(std::set< int > &ids) const
Definition: s2_ldb_access.hpp:10
virtual bool getRecvsOnLineIds(int line_id, std::set< int > &ids) const
virtual bool getPSCStrides(std::set< int > &strides) const
TrSet * m_ptrset
Definition: s2_ldb_access.hpp:105
S2LDBAccess(TrSet &trset)
virtual bool getCompsIds(std::set< int > &ids) const
Definition: trset.h:96
AttrId
Definition: trace.hpp:34
virtual Trace::TimeT getTimeStep() const
virtual bool getRecvsIds(std::set< int > &ids) const
virtual int getTracesNum() const