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
00027
00028 #ifndef MINISEEDTRACE_H
00029 #define MINISEEDTRACE_H
00030
00031 #include "GeopsyCoreDLLExport.h"
00032 #include "MiniSeedRecords.h"
00033
00034 namespace GeopsyCore {
00035
00036 class MiniSeedTrace
00037 {
00038 MiniSeedTrace(const MiniSeedTrace& t);
00039 public:
00040 MiniSeedTrace(LibMSeed::MSRecord * msr);
00041 ~MiniSeedTrace();
00042
00043 void addRecord(LibMSeed::MSRecord * msr, off_t pos);
00044 bool belongsTo(LibMSeed::MSRecord * msr);
00045 MiniSeedTrace * split();
00046
00047 double samplingFrequency() const {return _samplingFrequency;}
00048 QString channel() const {return _channel;}
00049 QString network() const {return _network;}
00050 QString station() const {return _station;}
00051 QString location() const {return _location;}
00052
00053 QDateTime startTime() const {return _records.first()->_startTime;}
00054 double t0() const {return _records.first()->_t0;}
00055 int nSamples() const;
00056 MiniSeedRecords records() const;
00057 private:
00058 double _samplingFrequency, _deltaT;
00059 QString _network, _station, _location, _channel;
00060
00061 void splitOverlapping(int firstRecord, MiniSeedTrace * sig);
00062 class Record
00063 {
00064 public:
00065 static bool lessThan(const Record * r1, const Record * r2) {
00066 return r1->_startTime < r2->_startTime || (r1->_startTime==r2->_startTime && r1->_t0 < r2->_t0);
00067 }
00068
00069 int _nSamples;
00070 QDateTime _startTime;
00071 double _t0;
00072 off_t _pos;
00073 quint32 _byteLength;
00074 };
00075 QList<Record *> _records;
00076 bool _sorted;
00077 };
00078
00079 }
00080
00081 #endif // MINISEEDTRACE_H