Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef PROCESS_H
00027 #define PROCESS_H
00028
00029 #include <GeopsyCore.h>
00030
00031 #include "Schedule.h"
00032
00033 class Process : public Thread
00034 {
00035 Q_OBJECT;
00036 public:
00037 Process();
00038 ~Process();
00039
00040 bool setArguments(int& argc, char ** argv);
00041 bool failed() const {return _failed;}
00042
00043 static const QString defaultDataDir;
00044 static const QString defaultTimeDir;
00045 static const QString defaultStationFile;
00046 static const QString defaultDestDir;
00047 static const QString defaultWorkDir;
00048 static const QString defaultTitanFormatFile;
00049 private slots:
00050 void pick(SubSignalPool * subPool, QString key, TimeRange recRange);
00051 void addRange(QString key, SparseTimeRange * r);
00052 void removeSignal(Signal * sig);
00053 void releasePickTool();
00054 protected:
00055 virtual void run();
00056 signals:
00057 void readyToPick(SubSignalPool * subPool, QString key, TimeRange recRange);
00058 private:
00059 void loadManualLimits();
00060 void saveManualLimits();
00061 QStringList readStations();
00062 bool loadTimeCorrections();
00063
00064 QDir _dataDir;
00065 QDir _timeDir;
00066 QString _stationFile;
00067 QDir _destDir;
00068 QDir _workDir;
00069 QString _titanFormatFile;
00070 DateTime _timeReference;
00071 double _samplingFrequency;
00072 double _adcDelay, _filterDelay;
00073 bool _pickOnly;
00074 QString _manualLimitsFileName;
00075 bool _failed;
00076
00077 AsciiSignalFormat _titanFormat;
00078 ScheduleList _schedule;
00079 QStringList _arrayStations, _hvStations;
00080 QMap<QString, Curve<Point2D> > _timeUncorr2Corr;
00081 QMap<QString, SparseTimeRange> _manualLimits;
00082 QMutex _manualLimitsMutex;
00083 SubSignalPool _pickSubPool;
00084 int _pickToolCount;
00085 QMutex _removeMutex;
00086 QList<Signal *> _toRemove;
00087 QMutex _pickToolMutex;
00088 };
00089
00090 #endif // PROCESS_H