45 #define DATRW_IMSEEDSTREAM_CC_VERSION \ 46 "DATRW_IMSEEDSTREAM_CC V1.9" 50 #include <datrwxx/mseedread.h> 51 #include <aff/subarray.h> 56 #include <datrwxx/mseed_keywords.h> 60 const std::ios_base::openmode
91 const std::string& modifier,
93 Tbase(is, true, true, true, debug), Mmodifier(modifier),
94 Mdumpascii(false), Mchecks(true, true)
132 "imseedstream::imseedstream()");
148 return(datrw::util::convert<Tiseries,Tfseries>(this->
read()));
155 return(datrw::util::convert<Tiseries,Tdseries>(this->
read()));
162 return(this->
read());
199 typedef std::vector<Tiseries> Tvecofrecorddata;
200 Tvecofrecorddata vecofrecorddata;
206 "invalid record; passed end of file?");
214 libtime::TRelativeTime
dt=libtime::double2time(wid2line.dt);
219 sff::WID2compare wid2areequal(sff::Fdate
230 wid2areequal.setdatetolerance(this->
Mttolerance*1.e-6/wid2line.dt);
240 sff::WID2 nextwid2=wid2line;
243 bool contiguous=
true;
248 "save data from record (" 252 if (!skipdata) { vecofrecorddata.push_back(
data.copyout()); }
303 Tvecofrecorddata::const_iterator I(vecofrecorddata.begin());
308 while (I != vecofrecorddata.end())
virtual Tdseries dseries()
bool Mdumpascii
dump ASCII data if true
bool fatal
Consequences of check.
const char *const usec
keywords for consistency checks
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
ConsistencyCheckControl nsamples
Check for consistent number of samples.
ConsistencyCheckControl data
Check for consistent data values.
datrw::mseed::Record Mrecord
data read ahead
macro function for debugging output (prototypes)
aff::Series< float > Tfseries
static const std::ios_base::openmode openmode
datrw::mseed::ConsistencyChecks Mchecks
const char *const nframes
keywords for consistency checks
virtual Tiseries iseries()
libtime::TRelativeTime dt()
return sampling interval of HPMO data acquisition (i.e. 5 sec)
void read(std::istream &is, const bool &dumpascii=false, const bool &estimateNframes=false, const ConsistencyChecks &checks=ConsistencyChecks(true, true))
read and decode a record to SFF
imseedstream(std::istream &is, const std::string &modifier="", const bool &debug=false)
const char *const ttolerance
keywords for format modifiers
aff::Series< double > Tdseries
virtual void skipseries()
const int nsamples
number of samples per minute block and channel
ConsistencyCheckControl usec
Check for usec field being in specified range.
void setwid2(const sff::WID2 &wid2)
Tiseries read(const bool &skipdata=false)
read file
const char *const data
keywords for consistency checks
const char *const dumpascii
keywords for format modifiers
Root namespace of library.
bool MestimateNframes
estimate frame count flags controlling consistency checks
utilities used by more than one type of data reader (prototypes)
bool docheck
Activation of check.
const char *const skipcheck
keywords for format modifiers
double Mttolerance
timing tolerance in microseconds
aff::Series< int > Tiseries
#define DATRW_debug(C, N, M)
produce debug output
const char *const all
keywords for consistency checks
const char *const streamID
Format properties.
provide mini-SEED data (prototypes)
std::string Mmodifier
format modifier
const char *const nsamples
number of samples per minute block and channel
const char *const estimateNframes
keywords for format modifiers
ConsistencyCheckControl nframes
Check for consistent number of frames.
const bool isbinary
Format properties.
virtual Tfseries fseries()
const char *const nonfatal
keywords for format modifiers