Public Member Functions | Protected Member Functions | Protected Attributes
FKLoop Class Reference

Brief description of class still missing. More...

#include <FKLoop.h>

Inheritance diagram for FKLoop:
QGpCoreTools::ParallelLoop HRFKLoop LinearFKPassiveLoop

List of all members.

Public Member Functions

void addLog (const QString &s) const
 FKLoop ()
bool hasComponent (int iComp) const
void lockOutput (int iComp) const
QFile * output (int iComp) const
void setArray (const ArrayStations *a)
void setLog (QString *l)
bool setParameters (FKParameters *p)
void unlockOutput (int iComp) const
 ~FKLoop ()

Protected Member Functions

virtual LoopTasknewTask ()

Protected Attributes

const ArrayStations_array
const FKParameters_param

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

References _array, _param, and TRACE.

{
  TRACE;
  for(int i=0; i<3; i++) _dotmax[i]=0;
  _log=0;
  _param=0;
  _array=0;
}

References _param, and TRACE.

{
  TRACE;
  for(int i=0; i<3; i++) {
    delete _dotmax[i];
  }
  delete _param;
}

Member Function Documentation

void FKLoop::addLog ( const QString &  s) const

References TRACE.

Referenced by LinearFKPassiveLoopTask::run(), and FKLoopTask::run().

{
  TRACE;
  if(_log) {
    _logMutex.lock();
    (*_log) += s;
    _logMutex.unlock();
  }
}
bool FKLoop::hasComponent ( int  iComp) const [inline]
void FKLoop::lockOutput ( int  iComp) const [inline]

Referenced by FKLoopTask::exportResults().

{_dotmaxMutex[iComp].lock();}
LoopTask * FKLoop::newTask ( ) [protected, virtual]
QFile* FKLoop::output ( int  iComp) const [inline]

Referenced by FKLoopTask::exportResults().

{return _dotmax[iComp];}
void FKLoop::setArray ( const ArrayStations a)

References _array, and TRACE.

Referenced by ToolLinearFKPassive::start(), ToolHRFK::start(), and ToolFK::start().

{
  TRACE;
  _array=array;
}
void FKLoop::setLog ( QString *  l) [inline]

References _array, _param, GeopsyCore::StationList::components(), and ArrayCore::ArrayParameters::outputFile().

Referenced by ToolLinearFKPassive::start(), and ToolFK::start().

{
  ASSERT(_array);
  _param=p;
  if(_param->outputFile().isEmpty()) {
    return false;
  }
  // Open output files
  QFile * f;
  StationSignals::Components comps=_array->components();
  if(comps & StationSignals::VerticalComponent) {
    QString suffix=comps & StationSignals::HorizontalComponent ? "vertical" : "";
    f=initMaxFile(suffix);
    if(!f) return false;
    _dotmax[0]=f;
  }
  if(comps & StationSignals::HorizontalComponent) {
    f=initMaxFile("radial");
    if(!f) return false;
    _dotmax[1]=f;
    f=initMaxFile("transverse");
    if(!f) return false;
    _dotmax[2]=f;
  }
  return true;
}
void FKLoop::unlockOutput ( int  iComp) const [inline]

Referenced by FKLoopTask::exportResults().

{_dotmaxMutex[iComp].unlock();}

Member Data Documentation

const ArrayStations* FKLoop::_array [protected]
const FKParameters* FKLoop::_param [protected]

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