OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SeisImpBPSIF Class Reference

reads a BPSIF prestack data exchange file into a PS data store More...

Inheritance diagram for SeisImpBPSIF:
[legend]

Public Member Functions

 SeisImpBPSIF (const char *filenm, const MultiID &)
 
virtual ~SeisImpBPSIF ()
 
void setMaxInlOffset (int)
 
uiString uiMessage () const
 will be message() again in 7.x More...
 
od_int64 nrDone () const
 
uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
int nextStep ()
 
int nrFiles () const
 
const BufferStringSetheader () const
 
const BufferStringSetshotAttrs () const
 
const BufferStringSetrcvAttrs () const
 
bool isIrregular () const
 
int nrShots () const
 
int nrRcvrs () const
 
int nrRejected () const
 
- Public Member Functions inherited from Executor
 Executor (const char *nm)
 
virtual ~Executor ()
 
virtual int doStep ()
 
bool go (od_ostream *s=0, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
bool go (od_ostream &s, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
virtual bool execute ()
 
- Public Member Functions inherited from SequentialTask
 SequentialTask (const char *nm=0)
 
virtual ~SequentialTask ()
 
void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
ProgressMeterprogressMeter ()
 
const ProgressMeterprogressMeter () const
 
bool execute ()
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual int64_t totalNr () const
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
bool workControlEnabled () const
 
virtual void controlWork (Control)
 
virtual Control getState () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Protected Member Functions

bool open (const char *)
 
bool openNext ()
 
bool readFileHeader ()
 
void addAttr (BufferStringSet &, char *)
 
int readAscii ()
 
int readBinary ()
 
int addTrcsAscii (const SeisTrc &, char *)
 
bool addTrcsBinary (const SeisTrc &)
 
int fileEnded ()
 
int writeData ()
 
- Protected Member Functions inherited from Executor
virtual bool goImpl (od_ostream *, bool, bool, int)
 
- Protected Member Functions inherited from Task
 Task (const char *nm=0)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

int curfileidx_
 
int nrshots_
 
int nrrejected_
 
int nrrcvpershot_
 
bool binary_
 
bool irregular_
 
bool endofinput_
 
StreamData cursd_
 
BufferStringSet fnames_
 
BufferStringSet hdrlines_
 
BufferStringSet shotattrs_
 
BufferStringSet rcvattrs_
 
SeisPSImpDataMgrdatamgr_
 
uiString errmsg_
 
- Protected Attributes inherited from SequentialTask
ProgressMeterprogressmeter_
 
int lastupdate_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Private Member Functions

 mODTextTranslationClass (SeisImpBPSIF)
 

Additional Inherited Members

- Public Types inherited from Task
enum  Control { Run, Pause, Stop }
 
- Static Public Member Functions inherited from SequentialTask
static int ErrorOccurred ()
 
static int Finished ()
 
static int MoreToDo ()
 
static int WarningAvailable ()
 
- Static Public Member Functions inherited from Task
static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 
- Public Attributes inherited from Executor
Notifier< Executorprestep
 
Notifier< Executorpoststep
 Only when MoreToDo will be returned. More...
 

Detailed Description

reads a BPSIF prestack data exchange file into a PS data store

The BPSIF format is defined as follows: First line is "#BPSIF#" Then, a header follows with only empty lines and lines starting with '#'. Some are mandatory (see below). The header stops at a line starting with "#----" After the header, lines follow with one shot per line. The line starts with data specific for the shot, then the data per receiver (group) follows. Mandatory data for each shot is number, X and Y. For receivers: X and Y.

The header needs to define the 'attributes' with '#Value.' lines. Example:

#Value.1.0: SHOT NUMBER #Value.1.1: SOURCE X #value.1.2: SOURCE Y #Value.1.3: SOURCE ATTRIBUTE-1 = SOURCE PRESSURE (PSI) #Value.1.4: SOURCE ATTRIBUTE-2 = SPEED THROUGH WATER (KNOTS)

#Value.2.1: STREAMER-1 NEAR RECEIVER X #Value.2.2: STREAMER-1 NEAR RECEIVER Y #Value.2.3: RECEIVER ATTRIBUTE-1 = STREAMER-1 NEAR RECEIVER DEPTH (METRES) #Value.2.4: RECEIVER ATTRIBUTE-2 = STREAMER-1 NEAR RECEIVER AMBIENT RMS NOISE

Typically, lines will be extremely long. The number of values per line is: 3 + nr_opt_shot_attribs + N * (2 + nr_opt_rcv_attribs).

This class will read a BPSIF and store the data in a prestack data store. Notes: The data will be sorted if the data store requires that The input filename may contain glob expression, e.g. line*.dat. These files will be handled in alphabetical order. This can be important if the data needs to be sorted. The 'real' name of the attribute is the part after the '=' sign, but it's not mandatory. If there is no '=' sign, the whole string after the ':' is used.

The actual stoarge is handled by the SeisPSImpDataMgr object - see more comments there.

Constructor & Destructor Documentation

SeisImpBPSIF::SeisImpBPSIF ( const char *  filenm,
const MultiID  
)
virtual SeisImpBPSIF::~SeisImpBPSIF ( )
virtual

Member Function Documentation

void SeisImpBPSIF::addAttr ( BufferStringSet ,
char *   
)
protected
int SeisImpBPSIF::addTrcsAscii ( const SeisTrc ,
char *   
)
protected
bool SeisImpBPSIF::addTrcsBinary ( const SeisTrc )
protected
int SeisImpBPSIF::fileEnded ( )
protected
const BufferStringSet& SeisImpBPSIF::header ( ) const
inline
bool SeisImpBPSIF::isIrregular ( ) const
inline
SeisImpBPSIF::mODTextTranslationClass ( SeisImpBPSIF  )
private
int SeisImpBPSIF::nextStep ( )
virtual
Return values
MoreToDo()Not finished. Call me again.
Finished()Nothing more to do.
ErrorOccurred()Something went wrong.
Note
if function returns a value greater than cMoreToDo(), it should be interpreted as cMoreToDo().

Implements SequentialTask.

od_int64 SeisImpBPSIF::nrDone ( ) const
inlinevirtual
Note
nrDone is only used for displaying progress and will be compared to totalNr to show user how large part of the task that is finished.

Reimplemented from Task.

int SeisImpBPSIF::nrFiles ( ) const
inline
int SeisImpBPSIF::nrRcvrs ( ) const
inline
int SeisImpBPSIF::nrRejected ( ) const
inline
int SeisImpBPSIF::nrShots ( ) const
inline
bool SeisImpBPSIF::open ( const char *  )
protected
bool SeisImpBPSIF::openNext ( )
protected
const BufferStringSet& SeisImpBPSIF::rcvAttrs ( ) const
inline
int SeisImpBPSIF::readAscii ( )
protected
int SeisImpBPSIF::readBinary ( )
protected
bool SeisImpBPSIF::readFileHeader ( )
protected
void SeisImpBPSIF::setMaxInlOffset ( int  )
const BufferStringSet& SeisImpBPSIF::shotAttrs ( ) const
inline
uiString SeisImpBPSIF::uiMessage ( ) const
virtual

will be message() again in 7.x

Note
totalNr is only used for displaying progress.

Reimplemented from Task.

uiString SeisImpBPSIF::uiNrDoneText ( ) const
inlinevirtual

will be nrDoneText() in 7.x

Reimplemented from Task.

int SeisImpBPSIF::writeData ( )
protected

Member Data Documentation

bool SeisImpBPSIF::binary_
protected
int SeisImpBPSIF::curfileidx_
protected
StreamData SeisImpBPSIF::cursd_
protected
SeisPSImpDataMgr& SeisImpBPSIF::datamgr_
protected
bool SeisImpBPSIF::endofinput_
protected
uiString SeisImpBPSIF::errmsg_
mutableprotected
BufferStringSet SeisImpBPSIF::fnames_
protected
BufferStringSet SeisImpBPSIF::hdrlines_
protected
bool SeisImpBPSIF::irregular_
protected
int SeisImpBPSIF::nrrcvpershot_
protected
int SeisImpBPSIF::nrrejected_
protected
int SeisImpBPSIF::nrshots_
protected
BufferStringSet SeisImpBPSIF::rcvattrs_
protected
BufferStringSet SeisImpBPSIF::shotattrs_
protected

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