UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hds_db_zd_seismic.hpp
1 /* __hds_db_zd_seismic_hpp */
2 /* $Id$ */
3 #ifndef __hds_db_zd_seismic_hpp
4 #define __hds_db_zd_seismic_hpp
5 
6 #include <zq4/zd_seismic_set.hpp>
7 #include <hds_db/base/seismic.hpp>
8 
10 namespace hds
11 {
13  namespace db
14  {
16  class ZdSeismic : public ZdSeismicSet
17  {
18  public:
19 
21  ZdSeismic(const char* szDocName = NULL);
22 
24  virtual ~ZdSeismic();
25 
26 
33 
34 
36  virtual const ZqbAbstrTrace& tracePar () const;
37 
38 
40  virtual int traceCount () const;
41 
43  virtual void getAllTraceIds (TraceIdsV& viTraceIds) const;
44 
45 
48  virtual const ZqbRealTrace& trace (int ens_index = 0);
49 
52  virtual const ZqbHeader& header (int ens_index = 0);
53 
54 
56  virtual int getFieldsCount() const;
57 
59  virtual const ZqbHdrField* headerWordInfo(int hwId) const;
60 
61 
63  virtual int coordCount () const;
64 
67  virtual int coordToTraceId (double fCoord,
68  int iEnsIndex = 0);
69 
72  virtual void coordToTraceIds (double fCoord,
73  TraceIdsV& viTraceIds);
74 
76  virtual void getCoords (CoordsV& vfCoords);
77 
80  virtual double traceIdToCoord (int iTraceId,
81  int* piEnsIndex = NULL);
82 
83 
86  virtual bool getCoordRange (double c[2]);
87 
89  virtual double averageCoordStep ();
90 
92  virtual int maxEnsembleLength ();
93 
94 
97  virtual bool goFirstCoord ();
98 
101  virtual bool goNextCoord ();
102 
105  virtual double coord ();
106 
109  virtual int ensembleLength ();
110 
111 
116  virtual bool setHeader (int id, const ZqbHeader& hdr);
117 
121  virtual bool setTrace (int id, const ZqbRealTrace& rtr);
122 
127  virtual bool setSamples (int id, const float* pSamples);
128 
129 
132  virtual const ZqbHeader* headerById (int id);
133 
136  virtual const float* samplesById (int id);
137 
140  virtual const ZqbRealTrace* traceById (int id);
141 
145  virtual int traceId (int ens_index = 0);
146 
148  virtual void setCustomCoord(int iCoordId);
149 
151  virtual int getCustomCoord() const;
152 
155  virtual void* custom(int ens_index, ZqbType* pRetType);
156 
159  virtual const char* coordMeaning () const;
160 
162  virtual const char* coordUnit () const;
163 
165  virtual ZqbType coordTypeFromId(int coordId) const;
166 
167 
169  virtual void setFirstOrder (int iCoordHW,
170  ZqbOrder eOrder = Z_O_ASCENT);
171  virtual bool getFirstOrder (int &iCoordHW, ZqbOrder &eOrder) const;
172 
174  virtual void setSecondaryOrder (int iSecondaryHW,
175  ZqbOrder eOrder = Z_O_ASCENT);
176  virtual bool getSecondaryOrder (int &iSecondaryHW, ZqbOrder &eOrder) const;
177 
179  virtual void setTertiaryOrder (int iTertiaryHW,
180  ZqbOrder eOrder = Z_O_ASCENT);
181  virtual bool getTertiaryOrder (int &iTertiaryHW, ZqbOrder &eOrder) const;
182 
184  virtual void setCoordsSelection(const CoordSelectionVec &selCoords)
185  {m_vSelectCoords = selCoords;}
186 
188  virtual const CoordSelectionVec& getCoordsSelection() const
189  {return m_vSelectCoords;}
190 
192  virtual void applyOrder();
193 
195  virtual void resetOrder();
196 
197  protected:
198 
201 
202  private:
203 
205  static int s_iNameCounter;
206 
208  static const char *s_szOwnType;
209 
211  bool m_b_attach_new_trace;
212 
214  int m_custom_coord;
215 
217  hds::db::TrHeader m_db_header;
218 
220  ZqbHeaderDef m_header_defs;
221 
222  ZqbAbstrTrace m_abstr_trace;
223  ZqbRealTrace *m_p_trace;
224  ZqbHeader *m_p_header;
225 
227  int m_cur_trace_id;
228 
229  static const std::string m_def_coord_meaning;
230  static const std::string m_def_coord_unit;
231 
233  ZdCoordObjStream::CoordSelectionVec m_vSelectCoords;
234 
236  struct CoordSorting
237  {
238  bool enabled;
239  int coordId;
240  ZqbOrder order;
241  };
242  std::vector<CoordSorting> m_vSortingCoords;
243 
244 
246  void setup_data();
247 
249  void make_def_header(const hds::db::TrHeader &db_hdr, ZqbHeaderDef &hdr_def) const;
250 
251  };
252  }; // db
253 }; // hds
254 
255 #endif /* __hds_db_zd_seismic_hpp */
virtual const char * coordUnit() const
Definition: zqb_hdr_field.h:16
virtual const char * coordMeaning() const
std::vector< double > CoordsV
Definition: zd_seismic_set.hpp:25
virtual const float * samplesById(int id)
virtual double coord()
virtual const ZqbRealTrace * traceById(int id)
virtual int getFieldsCount() const
virtual const CoordSelectionVec & getCoordsSelection() const
Definition: hds_db_zd_seismic.hpp:188
virtual int maxEnsembleLength()
Definition: zqb_header.hpp:27
virtual const ZqbAbstrTrace & tracePar() const
Definition: seismic.hpp:19
virtual bool getFirstOrder(int &iCoordHW, ZqbOrder &eOrder) const
virtual const ZqbHeader * headerById(int id)
virtual const ZqbHdrField * headerWordInfo(int hwId) const
virtual void setCoordsSelection(const CoordSelectionVec &selCoords)
Definition: hds_db_zd_seismic.hpp:184
virtual const ZqbRealTrace & trace(int ens_index=0)
ErrCode
Definition: defines.hpp:46
virtual bool getCoordRange(double c[2])
virtual bool goNextCoord()
virtual void setCustomCoord(int iCoordId)
virtual int getCustomCoord() const
virtual const ZqbHeader & header(int ens_index=0)
virtual void applyOrder()
virtual int coordCount() const
virtual bool setSamples(int id, const float *pSamples)
Definition: zqb_hdr_def.hpp:19
virtual void resetOrder()
Definition: zqb_abstr_trace.hpp:13
virtual double averageCoordStep()
std::vector< int > TraceIdsV
Definition: zd_seismic_set.hpp:22
virtual void coordToTraceIds(double fCoord, TraceIdsV &viTraceIds)
hds::db::ErrCode init(db::Seismic *pseis_db)
Definition: zqb_real_trace.hpp:19
virtual ZqbType coordTypeFromId(int coordId) const
virtual void * custom(int ens_index, ZqbType *pRetType)
virtual bool setHeader(int id, const ZqbHeader &hdr)
virtual int traceCount() const
virtual bool goFirstCoord()
virtual void setFirstOrder(int iCoordHW, ZqbOrder eOrder=Z_O_ASCENT)
virtual int ensembleLength()
virtual void getCoords(CoordsV &vfCoords)
Definition: tr_header.hpp:17
virtual void setSecondaryOrder(int iSecondaryHW, ZqbOrder eOrder=Z_O_ASCENT)
virtual bool getTertiaryOrder(int &iTertiaryHW, ZqbOrder &eOrder) const
std::vector< CoordSelection > CoordSelectionVec
Definition: zd_coord_obj_stream.hpp:39
virtual bool getSecondaryOrder(int &iSecondaryHW, ZqbOrder &eOrder) const
ZdSeismic(const char *szDocName=NULL)
Definition: zd_seismic_set.hpp:17
Definition: hds_db_zd_seismic.hpp:16
hds::db::Seismic * mp_seis_db
Definition: hds_db_zd_seismic.hpp:200
virtual ~ZdSeismic()
virtual double traceIdToCoord(int iTraceId, int *piEnsIndex=NULL)
virtual int coordToTraceId(double fCoord, int iEnsIndex=0)
virtual void getAllTraceIds(TraceIdsV &viTraceIds) const
virtual void setTertiaryOrder(int iTertiaryHW, ZqbOrder eOrder=Z_O_ASCENT)
virtual bool setTrace(int id, const ZqbRealTrace &rtr)
virtual int traceId(int ens_index=0)