38 #ifndef DATRW_MSEEDREAD_H_VERSION 40 #define DATRW_MSEEDREAD_H_VERSION \ 41 "DATRW_MSEEDREAD_H V1.2" 44 #include<datrwxx/seedstructs.h> 46 #include<aff/series.h> 82 typedef aff::Series<Tvalue>
Theap;
91 {
return(this->
blocksize()*
sizeof(Tvalue)); }
96 {
return(
Mblock.pointer()+i); }
128 Debug(
const bool& nonfatalflag=
false,
129 const bool& raflag=
false):
168 void read(std::istream& is);
195 libtime::TAbsoluteTime
date()
const;
251 { mr.
read(is);
return(is); }
260 bool needswap(
const unsigned char& bytesex);
264 const short int& srmult);
267 void help(std::ostream& os=std::cout);
273 #endif // DATRW_MSEEDREAD_H_VERSION (includeguard) ConsistencyChecks Mchecks
flags controlling consistency checks
aff::Series< Tvalue > Theap
use aff shared heap to store and copy block
int xm1() const
return last sample of previous record
MiniSEEDRecord(const Debug &d=Debug(false, false))
char Tvalue
type of data block value
aff::Series< double > Tseries
MiniSEEDblock readheader(std::istream &is)
read header and return block
void checks(const ConsistencyChecks &flags)
adjust flags consistency checks
SEED::DataExtensionBlockette Mblockette1001
Data Extension Blockette.
const SEED::FixedDataRecordHeader & recordheader() const
returns Fixed Data Record Header
void read(std::istream &is)
read a full MiniSEED record including data samples
unsigned int bytesize() const
Debug(const bool &nonfatalflag=false, const bool &raflag=false)
constructor sets default values
std::istream & operator>>(std::istream &is, MiniSEEDblock &mb)
std::string location() const
return location code
std::string station() const
return station code
std::string extractstring(const char *s, const int &l)
Return a maximum of l characters.
bool Mhasblockette1001
Data Extension Blockette is present.
int Mxm1
Expected value of last sample in previous block.
std::string channel() const
return channel code
double samplinginterval(const short int &srate, const short int &srmult)
calculate sampling interval from srate and smult
double dt() const
return sampling interval
bool MestimateNframes
estimate number of frames
const SEED::DataExtensionBlockette & blockette1001() const
returns Data Extension Blockette
bool hasblockette1001() const
true if Data Extension Blockette is present
const SEED::DataOnlySEEDBlockette & blockette1000() const
returns Data Only SEED Blockette
bool needswap(const unsigned char &bytesex)
check bytesex
aff::Series< Tvalue > Tseries
type of container for sample data
MiniSEEDblock(const unsigned int &blocksize=standard_block_size)
Root namespace of library.
bool Mhasblockette1000
Data Only SEED Blockette is present.
libtime::TAbsoluteTime convert(const SEED::BTIME &t)
convert BTIME structure to libtime structure
unsigned int blocksize() const
int Tvalue
type of sample data
Tvalue operator[](const unsigned int &i)
bool valid() const
true if record was successfully read
Debug & debug()
return reference to debug flags
bool inconsistencies_are_not_fatal
make inconsistencies non fatal
SEED::FixedDataRecordHeader Mrecordheader
Fixed Data Record Header.
libtime::TAbsoluteTime date() const
return time of first sample
void estimateNframes(const bool &flag)
adjust flag for estimation of frame count
bool hasblockette1000() const
true if Data Only SEED Blockette is present
Tseries Mdata
Container for sample data.
void help(std::ostream &os=std::cout)
function to print online help
provide mini-SEED data (prototypes)
bool report_ascii_data_to_stdout
report ASCII lines
std::string network() const
return network code
unsigned int nsamples() const
number of samples
static const int standard_block_size
standard block size for mini-SEED files (in SeisComP)
void skipdata(std::istream &is)
only read header and blockettes, no data
SEED::DataOnlySEEDBlockette Mblockette1000
Data Only SEED Blockette.
Debug Mdebug
debug options
bool Mvalid
contains valid data
Tvalue * block(const unsigned int &i) const
Tseries data() const
Return actual data samples stored in object.