OpendTect  6.6
volprocchainexec.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: K. Tingdahl
8  Date: October 2006
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "volumeprocessingmod.h"
16 #include "volprocchain.h"
17 #include "executor.h"
18 
19 class JobCommunic;
20 
21 namespace VolProc
22 {
23 
26 mExpClass(VolumeProcessing) ChainExecutor : public Executor
28 public:
31 
39  const StepInterval<float>&,
40  od_uint64& maxmemusage,
41  int* nrchunks=0);
42 
43  uiString errMsg() const;
45 
47  virtual int nextStep();
48  virtual od_int64 nrDone() const;
49  virtual od_int64 totalNr() const;
50  virtual uiString uiMessage() const;
52 
53  bool areSamplesIndependent() const;
54  bool needsFullVolume() const;
55 
58 
59 private:
60 
61  class Epoch
62  {
63  public:
65  ~Epoch() { delete &taskgroup_; }
66 
67  void addStep(Step* s) { steps_ += s; }
68  const ObjectSet<Step>& getSteps() const { return steps_; }
69  BufferString errMsg() const { return errmsg_; }
70 
71  bool updateInputs();
72  bool doPrepare(ProgressMeter* progmeter=0);
73  void releaseData();
74  Task& getTask() { return taskgroup_; }
75 
78 
79  private:
80 
85  };
86 
87  bool scheduleWork();
89  const TrcKeySampling&,
90  const StepInterval<float>&);
92  const StepInterval<float>&,
93  od_uint64& memusage);
95  const TrcKeySampling&,
96  const StepInterval<float>&);
97 
98  void releaseMemory();
101  TrcKeySampling& stepoutputhrg,
102  StepInterval<int>& stepoutputzrg ) const;
104  TrcKeyZSampling&) const;
105  mDeprecatedDef float getSampleShift(float) const;
108  const TypeSet<TrcKeySampling>& epochstks,
109  const TypeSet<StepInterval<int> >&) const;
110  void adjustStepsNrComponents(bool is2d);
111  bool checkAndSplit(od_int64 usage,od_int64& freemem,
112  int& nrchunks) const;
113 
115  bool isok_;
117  TrcKeySampling outputhrg_; // deprecated
119  mutable uiString errmsg_;
125 
128 
129  friend class ChainOutput;
130 
131 };
132 
133 } // namespace VolProc
134 
od_uint64
#define od_uint64
Definition: plftypes.h:36
VolProc::ChainExecutor::areSamplesIndependent
bool areSamplesIndependent() const
VolProc::ChainExecutor::epochs_
ObjectSet< Epoch > epochs_
Definition: volprocchainexec.h:121
TrcKeySampling
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:35
VolProc::ChainExecutor::nrDone
virtual od_int64 nrDone() const
VolProc::ChainExecutor::uiNrDoneText
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
VolProc::ChainExecutor::Epoch::Epoch
Epoch(const ChainExecutor &)
VolProc
Adapter for a VolProc chain to external attribute calculation.
Definition: seisdatapackwriter.h:24
VolProc::ChainExecutor::Epoch::getTask
Task & getTask()
Definition: volprocchainexec.h:74
VolProc::ChainExecutor::mODTextTranslationClass
mODTextTranslationClass(ChainExecutor)
VolProc::ChainExecutor::computeComputationScope
mDeprecatedDef void computeComputationScope(Step::ID stepid, TrcKeySampling &stepoutputhrg, StepInterval< int > &stepoutputzrg) const
VolProc::ChainOutput
Manages output creation for a VolProc::Chain.
Definition: volprocchainoutput.h:37
VolProc::ChainExecutor::Epoch::steps_
ObjectSet< Step > steps_
Definition: volprocchainexec.h:84
JobCommunic
Multi-machine socket communicator Handles the communication between a client and the primary host,...
Definition: jobcommunic.h:50
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
VolProc::ChainExecutor::Epoch::getSteps
const ObjectSet< Step > & getSteps() const
Definition: volprocchainexec.h:68
VolProc::Step::ID
int ID
Definition: volprocstep.h:44
od_int64
#define od_int64
Definition: plftypes.h:35
VolProc::ChainExecutor::errMsg
uiString errMsg() const
ProgressMeter
is an interface where processes can report their progress.
Definition: progressmeter.h:21
VolProc::ChainExecutor::Epoch::getOutput
const RegularSeisDataPack * getOutput() const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
VolProc::ChainExecutor::needsFullVolume
bool needsFullVolume() const
VolProc::ChainExecutor::Epoch::chainexec_
const ChainExecutor & chainexec_
Definition: volprocchainexec.h:82
VolProc::ChainExecutor::nextStep
virtual int nextStep()
VolProc::ChainExecutor::setCalculationScope
bool setCalculationScope(const TrcKeySampling &, const StepInterval< float > &, od_uint64 &maxmemusage, int *nrchunks=0)
VolProc::ChainExecutor::updateScheduledStepsSampling
void updateScheduledStepsSampling(const TrcKeySampling &, const StepInterval< float > &)
VolProc::ChainExecutor::getStepOutputMemory
mDeprecatedDef od_int64 getStepOutputMemory(Step::ID, int nr, const TypeSet< TrcKeySampling > &epochstks, const TypeSet< StepInterval< int > > &) const
VolProc::ChainExecutor::releaseMemory
void releaseMemory()
Task::Control
Control
Definition: task.h:55
VolProc::Chain
A chain of Steps that can be applied to a volume of scalars.
Definition: volprocchain.h:29
VolProc::ChainExecutor::controlWork
void controlWork(Task::Control)
VolProc::ChainExecutor::getCalculationScope
bool getCalculationScope(Step::ID stepid, TrcKeyZSampling &) const
VolProc::ChainExecutor::Epoch::taskgroup_
TaskGroup & taskgroup_
Definition: volprocchainexec.h:83
VolProc::ChainExecutor::curepoch_
Epoch * curepoch_
Definition: volprocchainexec.h:114
VolProc::ChainExecutor::checkAndSplit
bool checkAndSplit(od_int64 usage, od_int64 &freemem, int &nrchunks) const
VolProc::ChainExecutor::sGetStepErrMsg
static uiString sGetStepErrMsg()
TrcKeyZSampling
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
VolProc::ChainExecutor::~ChainExecutor
~ChainExecutor()
TaskGroup
A collection of tasks, that behave as a single task.
Definition: task.h:83
StepInterval< float >
VolProc::ChainExecutor::Epoch::errmsg_
BufferString errmsg_
Definition: volprocchainexec.h:81
VolProc::ChainExecutor::getStepEpochIndex
int getStepEpochIndex(Step::ID) const
VolProc::ChainExecutor::getOutput
const RegularSeisDataPack * getOutput() const
VolProc::ChainExecutor::computeLatestEpoch
int computeLatestEpoch(Step::ID) const
VolProc::ChainExecutor::Epoch::needsStepOutput
bool needsStepOutput(Step::ID) const
VolProc::ChainExecutor::isok_
bool isok_
Definition: volprocchainexec.h:115
VolProc::ChainExecutor::ChainExecutor
ChainExecutor(Chain &)
VolProc::ChainExecutor::Epoch::~Epoch
~Epoch()
Definition: volprocchainexec.h:65
Task
Generalization of something (e.g. a computation) that needs to be done in multiple steps.
Definition: task.h:28
VolProc::ChainExecutor::outputdp_
const RegularSeisDataPack * outputdp_
Definition: volprocchainexec.h:126
VolProc::ChainExecutor::Epoch::doPrepare
bool doPrepare(ProgressMeter *progmeter=0)
VolProc::ChainExecutor::setJobCommunicator
void setJobCommunicator(JobCommunic *)
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
VolProc::ChainExecutor::Epoch::releaseData
void releaseData()
RegularSeisDataPack
SeisDataPack for 2D and 3D seismic data.
Definition: seisdatapack.h:29
VolProc::ChainExecutor::stepstkzs_
ObjectSet< TrcKeyZSampling > stepstkzs_
Definition: volprocchainexec.h:124
executor.h
VolProc::ChainExecutor::nrChunks
int nrChunks(const TrcKeySampling &, const StepInterval< float > &, od_uint64 &memusage)
VolProc::ChainExecutor
executes the work for a single VolProc::Chain.
Definition: volprocchainexec.h:27
VolProc::ChainExecutor::Epoch::addStep
void addStep(Step *s)
Definition: volprocchainexec.h:67
VolProc::Step
An algorithm/calculation/transformation that takes one scalar volume as input, processes it,...
Definition: volprocstep.h:42
VolProc::Chain::Web
Definition: volprocchain.h:58
VolProc::ChainExecutor::web_
Chain::Web web_
Definition: volprocchainexec.h:122
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
VolProc::ChainExecutor::chain_
Chain & chain_
Definition: volprocchainexec.h:116
VolProc::ChainExecutor::scheduleWork
bool scheduleWork()
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
VolProc::ChainExecutor::getSampleShift
mDeprecatedDef float getSampleShift(float) const
VolProc::ChainExecutor::Epoch::updateInputs
bool updateInputs()
VolProc::ChainExecutor::outputhrg_
TrcKeySampling outputhrg_
Definition: volprocchainexec.h:117
MPE::errmsg_
BufferString errmsg_
Definition: horizontracker.h:118
VolProc::ChainExecutor::calculateMaximumMemoryUsage
od_uint64 calculateMaximumMemoryUsage(const TrcKeySampling &, const StepInterval< float > &)
VolProc::ChainExecutor::adjustStepsNrComponents
void adjustStepsNrComponents(bool is2d)
VolProc::ChainExecutor::uiMessage
virtual uiString uiMessage() const
will be message() again in 7.x
VolProc::ChainExecutor::jobcomm_
JobCommunic * jobcomm_
Definition: volprocchainexec.h:127
mDeprecatedDef
#define mDeprecatedDef
Definition: plfdefs.h:216
VolProc::ChainExecutor::Epoch::errMsg
BufferString errMsg() const
Definition: volprocchainexec.h:69
VolProc::ChainExecutor::outputzrg_
StepInterval< int > outputzrg_
Definition: volprocchainexec.h:118
VolProc::ChainExecutor::totalnrepochs_
int totalnrepochs_
Definition: volprocchainexec.h:123
VolProc::ChainExecutor::errmsg_
uiString errmsg_
Definition: volprocchainexec.h:119
VolProc::ChainExecutor::totalNr
virtual od_int64 totalNr() const
VolProc::ChainExecutor::scheduledsteps_
ObjectSet< Step > scheduledsteps_
Definition: volprocchainexec.h:120
volprocchain.h
VolProc::ChainExecutor::Epoch
Definition: volprocchainexec.h:62
TypeSet< TrcKeySampling >

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