OpendTect-6_4  6.4
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
VolProc::ChainExecutor Class Reference

executes the work for a single VolProc::Chain. More...

Inheritance diagram for VolProc::ChainExecutor:
[legend]

Classes

class  Epoch
 

Public Member Functions

 ChainExecutor (Chain &)
 
 ~ChainExecutor ()
 
bool setCalculationScope (const TrcKeySampling &, const StepInterval< float > &, od_uint64 &maxmemusage, int *nrchunks=0)
 
mDeprecated int nrChunks (const TrcKeySampling &, const StepInterval< int > &, int extranroutcomps=0)
 
mDeprecated od_int64 computeMaximumMemoryUsage (const TrcKeySampling &, const StepInterval< int > &)
 
uiString errMsg () const
 
uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
mDeprecated bool setCalculationScope (const TrcKeySampling &, const StepInterval< int > &)
 
mDeprecated void setOutputZSampling (const StepInterval< float > &)
 
const RegularSeisDataPackgetOutput () const
 
virtual int nextStep ()
 
virtual od_int64 nrDone () const
 
virtual od_int64 totalNr () const
 
virtual uiString uiMessage () const
 will be message() again in 7.x More...
 
bool areSamplesIndependent () const
 
bool needsFullVolume () const
 
void controlWork (Task::Control)
 
void setJobCommunicator (JobCommunic *)
 
- 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 void enableWorkControl (bool=true)
 Must be called before execute() More...
 
bool workControlEnabled () const
 
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...
 

Static Public Member Functions

static uiString sGetStepErrMsg ()
 
- 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 ()
 

Private Member Functions

 mODTextTranslationClass (ChainExecutor)
 
bool scheduleWork ()
 
void updateScheduledStepsSampling (const TrcKeySampling &, const StepInterval< float > &)
 
int nrChunks (const TrcKeySampling &, const StepInterval< float > &, od_uint64 &memusage)
 
od_uint64 calculateMaximumMemoryUsage (const TrcKeySampling &, const StepInterval< float > &)
 
void releaseMemory ()
 
int computeLatestEpoch (Step::ID) const
 
mDeprecated void computeComputationScope (Step::ID stepid, TrcKeySampling &stepoutputhrg, StepInterval< int > &stepoutputzrg) const
 
bool getCalculationScope (Step::ID stepid, TrcKeyZSampling &) const
 
mDeprecated float getSampleShift (float) const
 
int getStepEpochIndex (Step::ID) const
 
mDeprecated od_int64 getStepOutputMemory (Step::ID, int nr, const TypeSet< TrcKeySampling > &epochstks, const TypeSet< StepInterval< int > > &) const
 
void adjustStepsNrComponents (bool is2d)
 
bool needSplit (od_int64 usage, od_int64 &freemem, int &nrchunks) const
 

Private Attributes

Epochcurepoch_
 
bool isok_
 
Chainchain_
 
TrcKeySampling outputhrg_
 
StepInterval< int > outputzrg_
 
uiString errmsg_
 
ObjectSet< Stepscheduledsteps_
 
ObjectSet< Epochepochs_
 
Chain::Web web_
 
int totalnrepochs_
 
const RegularSeisDataPackoutputdp_
 
JobCommunicjobcomm_
 

Friends

class ChainOutput
 

Additional Inherited Members

- Public Types inherited from Task
enum  Control { Run, Pause, Stop }
 
- Public Attributes inherited from Executor
Notifier< Executorprestep
 
Notifier< Executorpoststep
 Only when MoreToDo will be returned. More...
 
- 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 inherited from SequentialTask
ProgressMeterprogressmeter_
 
int lastupdate_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Detailed Description

executes the work for a single VolProc::Chain.

Constructor & Destructor Documentation

VolProc::ChainExecutor::ChainExecutor ( Chain )
VolProc::ChainExecutor::~ChainExecutor ( )

Mandatory before the execution is started. The execution can start if success. However if nrchunks > 1, the execution will use a smaller sampling than requested to avoid running short of memory.

Member Function Documentation

void VolProc::ChainExecutor::adjustStepsNrComponents ( bool  is2d)
private
bool VolProc::ChainExecutor::areSamplesIndependent ( ) const
od_uint64 VolProc::ChainExecutor::calculateMaximumMemoryUsage ( const TrcKeySampling ,
const StepInterval< float > &   
)
private
mDeprecated void VolProc::ChainExecutor::computeComputationScope ( Step::ID  stepid,
TrcKeySampling stepoutputhrg,
StepInterval< int > &  stepoutputzrg 
) const
private
int VolProc::ChainExecutor::computeLatestEpoch ( Step::ID  ) const
private
mDeprecated od_int64 VolProc::ChainExecutor::computeMaximumMemoryUsage ( const TrcKeySampling ,
const StepInterval< int > &   
)
void VolProc::ChainExecutor::controlWork ( Task::Control  )
virtual

Reimplemented from Task.

uiString VolProc::ChainExecutor::errMsg ( ) const
bool VolProc::ChainExecutor::getCalculationScope ( Step::ID  stepid,
TrcKeyZSampling  
) const
private
const RegularSeisDataPack* VolProc::ChainExecutor::getOutput ( ) const
mDeprecated float VolProc::ChainExecutor::getSampleShift ( float  ) const
private
int VolProc::ChainExecutor::getStepEpochIndex ( Step::ID  ) const
private
mDeprecated od_int64 VolProc::ChainExecutor::getStepOutputMemory ( Step::ID  ,
int  nr,
const TypeSet< TrcKeySampling > &  epochstks,
const TypeSet< StepInterval< int > > &   
) const
private
VolProc::ChainExecutor::mODTextTranslationClass ( ChainExecutor  )
private
bool VolProc::ChainExecutor::needsFullVolume ( ) const
bool VolProc::ChainExecutor::needSplit ( od_int64  usage,
od_int64 freemem,
int &  nrchunks 
) const
private
virtual int VolProc::ChainExecutor::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.

mDeprecated int VolProc::ChainExecutor::nrChunks ( const TrcKeySampling ,
const StepInterval< int > &  ,
int  extranroutcomps = 0 
)
int VolProc::ChainExecutor::nrChunks ( const TrcKeySampling ,
const StepInterval< float > &  ,
od_uint64 memusage 
)
private
virtual od_int64 VolProc::ChainExecutor::nrDone ( ) const
virtual
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.

void VolProc::ChainExecutor::releaseMemory ( )
private
bool VolProc::ChainExecutor::scheduleWork ( )
private
bool VolProc::ChainExecutor::setCalculationScope ( const TrcKeySampling ,
const StepInterval< float > &  ,
od_uint64 maxmemusage,
int *  nrchunks = 0 
)

Return 0 if not enough memory for the execution

mDeprecated bool VolProc::ChainExecutor::setCalculationScope ( const TrcKeySampling ,
const StepInterval< int > &   
)
void VolProc::ChainExecutor::setJobCommunicator ( JobCommunic )
mDeprecated void VolProc::ChainExecutor::setOutputZSampling ( const StepInterval< float > &  )
static uiString VolProc::ChainExecutor::sGetStepErrMsg ( )
static
virtual od_int64 VolProc::ChainExecutor::totalNr ( ) const
virtual

Reimplemented from Task.

virtual uiString VolProc::ChainExecutor::uiMessage ( ) const
virtual

will be message() again in 7.x

Note
totalNr is only used for displaying progress.

Reimplemented from Task.

uiString VolProc::ChainExecutor::uiNrDoneText ( ) const
virtual

will be nrDoneText() in 7.x

Reimplemented from Task.

void VolProc::ChainExecutor::updateScheduledStepsSampling ( const TrcKeySampling ,
const StepInterval< float > &   
)
private

Friends And Related Function Documentation

friend class ChainOutput
friend

Member Data Documentation

Chain& VolProc::ChainExecutor::chain_
private
Epoch* VolProc::ChainExecutor::curepoch_
private
ObjectSet<Epoch> VolProc::ChainExecutor::epochs_
private
uiString VolProc::ChainExecutor::errmsg_
mutableprivate
bool VolProc::ChainExecutor::isok_
private
JobCommunic* VolProc::ChainExecutor::jobcomm_
private
const RegularSeisDataPack* VolProc::ChainExecutor::outputdp_
private
TrcKeySampling VolProc::ChainExecutor::outputhrg_
private
StepInterval<int> VolProc::ChainExecutor::outputzrg_
private
ObjectSet<Step> VolProc::ChainExecutor::scheduledsteps_
private
int VolProc::ChainExecutor::totalnrepochs_
private
Chain::Web VolProc::ChainExecutor::web_
private

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