TSOpt::SEGYDC Class Reference

OCDC specialization. More...

#include <segypp.hh>

List of all members.

Public Member Functions

 SEGYDC (string _hdr, ostream &_outfile=cerr)
 only legal constructor takes prototype filename and flag for unlinking tmp files
 ~SEGYDC ()
 destructor
string getHdr () const
ostream & write (ostream &str) const

Protected Member Functions

void open_p () const
segytraceget (bool &more)
segytrace const & get (bool &more) const
void put () const
void reset () const


Detailed Description

OCDC specialization.

Provides access to segy traces stored in files, as PackageContainer instance. A prototype filename is stored as object data, and all files used as out-of-core data for SEGYDC objects must match this prototype file in structure. File regarded as temporary if no name supplied by eval of AssignFilename prior to any other FO or FOR eval. In that case, file has w+ access and may be unlinked by iwave_fdestroy if this function is called in driver. If filename is supplied, then file may either exist or not. Constructor first attempts to open with r+ access. Total length is checked on open by iwave_fopen. If the file fails to open with r+ access (as will occur if the file does not exist, for example), or if total length does not match that of the prototype file, then regarded as a new file and opened with w+ permission instead - note that a side effect is that any existing data is truncated in this case! If open with r+ access succeeds, then number of samples per trace and time step are checked against prototype (for first trace - all traces assumed to be uniform in these headers).

PackageContainer access functions (both flavors of get, also put and reset) implemented via calls to SU i/o functions. Uses ContentPackage constructed out of segy trace struct from SU, with data part of trace identified as data part of ContentPackage - that is, in this case the data is part of the metadata!

To enable correct non-const FO evals, each trace is flagged as it is read - the flag signifies "read but not yet written". A write operation begins by seeking to the beginning of the trace, the offset of which is cached, if the flag is set (but not otherwise). The write unsets the flag. This design supports the purely sequential structure of PackageContainer function evaluation. A more flexible design with some degree of random access would require greater exposure and interpretation of file position information. For RTOp-type ops the present design is adequate. Operators implementing more complex interactions with trace data should probably be implemented as standalone out-of-core functions, on the IWAVE model.

Definition at line 122 of file segypp.hh.


Constructor & Destructor Documentation

TSOpt::SEGYDC::SEGYDC ( string  _hdr,
ostream &  _outfile = cerr 
)

only legal constructor takes prototype filename and flag for unlinking tmp files

TSOpt::SEGYDC::~SEGYDC (  ) 

destructor


Member Function Documentation

void TSOpt::SEGYDC::open_p (  )  const [protected]

segytrace& TSOpt::SEGYDC::get ( bool &  more  )  [protected]

segytrace const& TSOpt::SEGYDC::get ( bool &  more  )  const [protected]

void TSOpt::SEGYDC::put (  )  const [protected]

void TSOpt::SEGYDC::reset (  )  const [protected]

string TSOpt::SEGYDC::getHdr (  )  const

Definition at line 159 of file segypp.hh.

ostream& TSOpt::SEGYDC::write ( ostream &  str  )  const


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for IWAVETRACE by  doxygen 1.4.7