OpendTect-6_4  6.4
seiswrite.h
Go to the documentation of this file.
1 #ifndef seiswrite_h
2 #define seiswrite_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 27-1-98
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
29 #include "seismod.h"
30 #include "seisstor.h"
31 #include "fixedstring.h"
32 #include "linekey.h"
33 #include "uistring.h"
34 class SeisTrc;
35 class SeisPSWriter;
36 class Seis2DLinePutter;
37 namespace Threads { class ConditionVar; }
38 namespace PosInfo { class Line2DData; }
39 
40 
43 public:
44 
45  SeisTrcWriter(const IOObj*,
46  const GeomIDProvider* r=0);
49  SeisTrcWriter(const char*,bool is_2d,bool is_ps);
52  ~SeisTrcWriter();
53  virtual bool close();
54 
55  bool prepareWork(const SeisTrc&);
56  virtual bool put(const SeisTrc&);
57  int nrWritten() const { return nrwritten_; }
58 
59  bool isMultiComp() const;
60  bool isMultiConn() const;
61  IOPar& auxPars() { return auxpars_; }
62 
63  Seis2DLinePutter* linePutter() { return putter_; }
64  const Seis2DLinePutter* linePutter() const { return putter_; }
65 
66  SeisPSWriter* psWriter() { return pswriter_; }
67  const SeisPSWriter* psWriter() const { return pswriter_; }
68 
69  // 2D only
70  const GeomIDProvider* geomIDProvider() const { return gidp_; }
71  void setGeomIDProvider(const GeomIDProvider*);
72  void setSelData(Seis::SelData*);
75  void setAttrib( const char* a ) { attribnm_ = a; }
77  void setDataType( const char* dt ) { datatype_ = dt; }
78 
79  void setCrFrom( const char* str ) { crfrom_ = str; }
80  void setCrUserInfo( const char* str ) { crusrinfo_ = str; }
81  void setComponentNames(const BufferStringSet&);
82 
83 protected:
84 
85  bool prepared_;
86  int nrtrcs_;
89  int firstns_;
92 
93  void init();
94  void startWork();
95 
96  // PS only
98 
99  // 3D only
100  Conn* crConn(int,bool);
101  bool ensureRightConn(const SeisTrc&,bool);
102  bool start3DWrite(Conn*,const SeisTrc&);
103 
104  // 2D only
112  bool next2DLine();
113  bool put2D(const SeisTrc&);
114 
118 
119 };
120 
121 
127 { mODTextTranslationClass(SeisSequentialWriter);
128 public:
129  SeisSequentialWriter( SeisTrcWriter*, int buffsize=-1 );
132  ~SeisSequentialWriter();
133  bool announceTrace(const BinID&);
137  bool submitTrace( SeisTrc*, bool waitforbuffer=true );
141  bool submitGather( ObjectSet<SeisTrc>&,
142  bool waitforbuffer=true );
149  bool finishWrite();
153  uiString errMsg() const { return errmsg_; }
154 
155 protected:
156 
157  bool iterateBuffer(bool waitforbuffer);
158  void reportWrite(const char*);
159  friend class SeisSequentialWriterTask;
160 
165  const int maxbuffersize_;
166 
168 
169  int queueid_;
171 
172 };
173 
174 
175 #endif
int queueid_
Definition: seiswrite.h:169
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
Is an object that faciliates many threads to wait for something to happen.
Definition: thread.h:108
int nrWritten() const
Definition: seiswrite.h:57
Definition: ioobj.h:58
const GeomIDProvider * geomIDProvider() const
Definition: seiswrite.h:70
Pos::GeomID prevgeomid_
Definition: seiswrite.h:109
Seis2DLinePutter * linePutter()
Definition: seiswrite.h:63
void setCrUserInfo(const char *str)
Definition: seiswrite.h:80
BufferString attribnm_
Definition: seiswrite.h:105
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
BufferString datatype_
Definition: seiswrite.h:111
BinID latestbid_
Definition: seiswrite.h:167
SeisPSWriter * psWriter()
Definition: seiswrite.h:66
const Seis2DLinePutter * linePutter() const
Definition: seiswrite.h:64
bool init()
SeisTrc & worktrc_
Definition: seiswrite.h:88
Definition: seiswrite.h:41
Position info for a 2D line.
Definition: posinfo2d.h:65
Definition: uistring.h:89
Threads::ConditionVar & lock_
Definition: seiswrite.h:163
void setAttrib(const char *a)
if set, overrules attrib in linekey
Definition: seiswrite.h:75
Set of BufferString objects.
Definition: bufstringset.h:28
bool prepared_
Definition: seiswrite.h:85
TypeSet< int > spnrs_
Definition: seiswrite.h:108
int nrtrcs_
Definition: seiswrite.h:86
SeisPSWriter * pswriter_
Definition: seiswrite.h:97
BufferStringSet compnames_
Definition: seiswrite.h:117
interface to threads that should be portable.
Definition: atomic.h:28
int nrwritten_
Definition: seiswrite.h:87
Class providing a current line key.
Definition: linekey.h:53
PosInfo::Line2DData * linedata_
Definition: seiswrite.h:107
void setDataType(const char *dt)
Definition: seiswrite.h:77
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const GeomIDProvider * gidp_
Definition: seiswrite.h:110
interface for object that writes 2D seismic data
Definition: seis2dlineio.h:41
Seis2DLinePutter * putter_
Definition: seiswrite.h:106
uiString errMsg() const
Definition: seiswrite.h:153
contains input (sub-)selection data from a cube or lineset
Definition: seisselection.h:82
const SeisPSWriter * psWriter() const
Definition: seiswrite.h:67
int firstns_
Definition: seiswrite.h:89
Index_Type GeomID
Definition: commontypes.h:52
BufferString crfrom_
Definition: seiswrite.h:115
Data connection.
Definition: conn.h:30
Position info, often segmented.
Definition: posinfo.h:40
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Seismic trace.
Definition: seistrc.h:34
BufferString errmsg_
Definition: horizontracker.h:119
base class for seis reader and writer.
Definition: seisstor.h:33
Definition: seiswrite.h:126
TypeSet< BinID > announcedtraces_
Definition: seiswrite.h:162
IOPar & auxpars_
Definition: seiswrite.h:91
BufferString crusrinfo_
Definition: seiswrite.h:116
IOPar & auxPars()
Definition: seiswrite.h:61
SeisTrcWriter * writer_
Definition: seiswrite.h:161
uiString errmsg_
Definition: seiswrite.h:170
SamplingData< float > firstsampling_
Definition: seiswrite.h:90
ObjectSet< SeisTrc > outputs_
Definition: seiswrite.h:164
void setCrFrom(const char *str)
Definition: seiswrite.h:79
const int maxbuffersize_
Definition: seiswrite.h:165
writes to a prestack seismic data store.
Definition: seispswrite.h:35

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019