Brief description of class still missing. More...
#include <SPACLoop.h>
Public Member Functions | |
| void | addLog (const QString &s) const |
| const ArrayStations * | array () const |
| void | lockOutputMax () const |
| void | lockOutputStmap (int iComp) const |
| QFile * | outputMax () const |
| QFile * | outputStmap (int iComp) const |
| const RingCouples & | ring (int index) const |
| void | setArray (const ArrayStations *a) |
| void | setLog (QString *l) |
| bool | setParameters (SPACParameters *p) |
| SPACLoop () | |
| AutocorrCurves * | target () const |
| void | unlockOutputMax () const |
| void | unlockOutputStmap (int iComp) const |
| ~SPACLoop () | |
Protected Member Functions | |
| virtual LoopTask * | newTask () |
Protected Attributes | |
| const ArrayStations * | _array |
| const SPACParameters * | _param |
Brief description of class still missing.
Full description of class still missing
Description of destructor still missing
References _param, DinverDCCore::TargetList::autocorrTarget(), ArrayCore::ArrayParameters::outputFile(), DinverDCCore::AutocorrTarget::setCurves(), TRACE, and QGpCoreTools::XMLHeader::xml_saveFile().
{
TRACE;
if(_target) {
TargetList tl;
tl.autocorrTarget().setCurves( *_target);
XMLHeader hdr(&tl);
hdr.xml_saveFile(_param->outputFile()+".target");
delete _target;
}
for(int i=0; i<3; i++) {
delete _dotstmaps[i];
}
delete _dotmax;
delete _param;
}
| void SPACLoop::addLog | ( | const QString & | s | ) | const |
References TRACE.
Referenced by SPACLoopTask::run(), and setParameters().
{
TRACE;
if(_log) {
_logMutex.lock();
(*_log) += s;
_logMutex.unlock();
}
}
| const ArrayStations* SPACLoop::array | ( | ) | const [inline] |
References _array.
Referenced by SPACLoopTask::run(), setArray(), and SPACLoopTask::setParameters().
{return _array;}
| void SPACLoop::lockOutputMax | ( | ) | const [inline] |
{_outputMutex[3].lock();}
| void SPACLoop::lockOutputStmap | ( | int | iComp | ) | const [inline] |
Referenced by SPACLoopTask::run().
{_outputMutex[iComp].lock();}
| LoopTask * SPACLoop::newTask | ( | ) | [protected, virtual] |
Implements QGpCoreTools::ParallelLoop.
References _array, _param, SPACLoopTask::setArray(), SPACLoopTask::setLoop(), and SPACLoopTask::setParameters().
{
SPACLoopTask * t=new SPACLoopTask;
t->setLoop(this);
t->setArray(*_array);
t->setParameters(_param);
return t;
}
| QFile* SPACLoop::outputMax | ( | ) | const [inline] |
{return _dotmax;}
| QFile* SPACLoop::outputStmap | ( | int | iComp | ) | const [inline] |
Referenced by SPACLoopTask::run().
{return _dotstmaps[iComp];}
| const RingCouples& SPACLoop::ring | ( | int | index | ) | const [inline] |
References _param, and ArrayCore::SPACParameters::ring().
| void SPACLoop::setArray | ( | const ArrayStations * | a | ) |
| void SPACLoop::setLog | ( | QString * | l | ) | [inline] |
{_log=l;}
| bool SPACLoop::setParameters | ( | SPACParameters * | p | ) |
References _array, _param, addLog(), ArrayCore::RingCouples::log(), MSG_ID, GeopsyCore::StationList::nComponents(), ArrayCore::ArrayParameters::outputFile(), ArrayCore::SPACParameters::outputTypes(), ArrayCore::SPACParameters::overWrite(), ArrayCore::SPACParameters::ring(), ArrayCore::SPACParameters::ringCount(), QGpCoreTools::tr(), and TRACE.
{
TRACE;
ASSERT(_array);
_param=p;
if(_param->outputFile().isEmpty() || !p->overWrite(_array->nComponents())) {
return false;
}
if(_param->ringCount()==0) {
Message::warning(MSG_ID, tr("SPAC toolbox"),
tr("You forgot to define the rings\n"), Message::cancel());
return false;
}
if(_param->outputTypes() & SPACParameters::Target) {
setTarget();
}
if(_param->outputTypes() & SPACParameters::Stmap) {
setStmap();
}
if(_param->outputTypes() & SPACParameters::Max) {
setMax();
}
// Write ring log
int nRings=_param->ringCount();
for(int iRing=0;iRing < nRings;iRing++ ) {
addLog(_param->ring(iRing).log());
}
return true;
}
| AutocorrCurves* SPACLoop::target | ( | ) | const [inline] |
Referenced by SPACLoopTask::run().
{return _target;}
| void SPACLoop::unlockOutputMax | ( | ) | const [inline] |
{_outputMutex[3].unlock();}
| void SPACLoop::unlockOutputStmap | ( | int | iComp | ) | const [inline] |
Referenced by SPACLoopTask::run().
{_outputMutex[iComp].unlock();}
const ArrayStations* SPACLoop::_array [protected] |
Referenced by array(), newTask(), setArray(), setParameters(), and SPACLoop().
const SPACParameters* SPACLoop::_param [protected] |
Referenced by newTask(), ring(), setParameters(), SPACLoop(), and ~SPACLoop().