37 #define DATRW_IBINSTREAM_CC_VERSION \ 38 "DATRW_IBINSTREAM_CC V1.1" 40 #include <datrwxx/ibinstream.h> 50 const char*
const magic,
52 Mis(is), Mdebug(debug)
57 "magic number in file does not match!");
66 "ERROR (ibinstream::read): reading char value");
74 "ERROR (ibinstream::read): reading short value");
84 "ERROR (ibinstream::read): reading integer value");
93 sizeof(
unsigned int)),
94 "ERROR (ibinstream::read): reading unsigned int value");
103 "ERROR (ibinstream::read): reading double value");
112 "ERROR (ibinstream::read): reading float value");
122 aff::Series<char> s(length+1);
124 length*
sizeof(
char)),
125 "ERROR (ibinstream::read): reading string");
127 v=std::string(s.pointer());
135 char month, day, hour, minute, second;
136 short milsec, micsec;
145 v=libtime::TAbsoluteTime(year, month, day, hour, minute, second,
155 for (
unsigned int i=0; i<nlines; ++i)
169 this->
read(v.nsamples);
170 this->
read(v.station);
171 this->
read(v.channel);
173 this->
read(v.instype);
175 this->
read(v.calper);
188 v.cs=::sff::coosysID(cs);
200 v.cs=::sff::coosysID(cs);
204 this->
read(v.nstacks);
217 "ERROR (ibinstream::read): reading double series");
220 aff::Iterator<Tdseries> I(v);
239 "ERROR (ibinstream::read): reading float series");
242 aff::Iterator<Tfseries> I(v);
261 "ERROR (ibinstream::read): reading integer series");
264 aff::Iterator<Tiseries> I(v);
281 "ERROR (ibinstream::skipdseries): unreasonable index range");
282 unsigned int size=last-first+1;
295 "ERROR (ibinstream::skipfseries): unreasonable index range");
296 unsigned int size=last-first+1;
309 "ERROR (ibinstream::skipiseries): unreasonable index range");
310 unsigned int size=last-first+1;
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
macro function for debugging output (prototypes)
aff::Series< float > Tfseries
ibinstream(std::istream &is, const char *const magic, const bool &debug=false)
const char *const magic
magic number to identify file type and bytesex
unsigned int skipfseries()
Emagic_type file_magic_test(std::istream &is, const char *const cmagic, const bool &fortranmode)
check magic number in file
The magic number does match the file.
aff::Series< double > Tdseries
exception class declaration for libdatrwxx (prototypes)
T swap(const T &value)
How to swap any generic type.
unsigned int skipdseries()
A copy of bytesex.h from libtfxx (prototypes)
Root namespace of library.
aff::Series< int > Tiseries
The bytesex of the file must be swapped to match this machine.
#define DATRW_debug(C, N, M)
produce debug output
unsigned int skipiseries()
Emagic_type
Define bytesex indicator for magic number test.