Public Member Functions | Protected Member Functions
LinearFKPassiveLoopTask Class Reference

#include <LinearFKPassiveLoop.h>

Inheritance diagram for LinearFKPassiveLoopTask:
FKLoopTask QGpCoreTools::LoopTask QGpCoreTools::Thread

List of all members.

Public Member Functions

 LinearFKPassiveLoopTask ()
virtual void setGrid (double azimuth)
 ~LinearFKPassiveLoopTask ()

Protected Member Functions

virtual void run (int index)

Constructor & Destructor Documentation

References TRACE.

{
  TRACE;
  _linearGrid=0;
}

References TRACE.

{
  TRACE;
  delete _linearGrid;
}

Member Function Documentation

void LinearFKPassiveLoopTask::run ( int  index) [protected, virtual]

Reimplemented from FKLoopTask.

References FKLoopTask::_currentComponent, FKLoopTask::_loop, FKLoopTask::_process, FKLoopTask::_win, FKLoop::addLog(), GeopsyCore::TimeRangeList::at(), GeopsyCore::TimeRangeList::count(), QGpCoreTools::LoopTask::endIndex(), ArrayCore::ArrayProcess::lockTimeWindow(), ArrayCore::ArrayProcess::setFrequency(), QGpCoreTools::LoopTask::setProgressMaximum(), QGpCoreTools::LoopTask::setProgressValue(), QGpCoreTools::LoopTask::setStatus(), QGpCoreTools::LoopTask::terminated(), ArrayCore::ArrayProcess::timeRangeList(), TRACE, and ArrayCore::ArrayProcess::unlockTimeWindow().

{
  TRACE;
  // Revert the order: start with expensive high frequencies
  // When the number of cores increases and tends to the number
  // of frequencies, it is more efficient to start with with the
  // most expensive frequencies.
  index=endIndex()-index-1;

  QString freqLog, freqStatus;
  _process->setFrequency(index, &freqLog, &freqStatus);
  setStatus(freqStatus);
  _loop->addLog(freqLog);
  // Loop over all time windows
  const TimeRangeList& winList=*_process->timeRangeList();
  int nWin=winList.count();
  setProgressMaximum(nWin);
  for(int iWin=0; iWin<nWin; iWin++) {
    if(terminated()) break;
    setProgressValue(iWin);
    _win=&winList.at(iWin);
    if(!_process->lockTimeWindow(_win)) continue;
    _currentComponent=0;
    exportMax();
    _process->unlockTimeWindow();
  }
}
void LinearFKPassiveLoopTask::setGrid ( double  azimuth) [virtual]

References FKLoopTask::_grid, FKLoopTask::_process, LinearFKSearch::function(), ArrayCore::FKArrayProcess::function(), ArrayCore::FKParameters::maximumSlowness(), ArrayCore::FKParameters::maximumWaveNumber(), ArrayCore::FKParameters::minimumWaveNumber(), ArrayCore::FKArrayProcess::parameters(), QGpCoreTools::DirectionalSearch::setAzimuth(), LinearFKSearch::setFunction(), LinearFKSearch::setGrid(), ArrayCore::FK::setMaximumSlowness(), and TRACE.

Referenced by LinearFKPassiveLoop::newTask().

{
  TRACE;
  // FK tools use a FKGridSearch which is not valid in this case.
  // We must initialize to null to avoid problems with destructors.
  _grid[0]=0;
  // We need two search objets for both directions (initialization of shifts)
  _linearGrid=new LinearFKSearch;
  _linearGrid->setFunction(_process->function(0));
  _linearGrid->setAzimuth(azimuth);
  const FKParameters * param=_process->parameters();
  _linearGrid->setGrid(param->minimumWaveNumber(), param->maximumWaveNumber());
  _linearGrid->function()->setMaximumSlowness(param->maximumSlowness());
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines