DATRW++ library: seismic data I/O with multiple formats

◆ skipdata()

void datrw::mseed::MiniSEEDRecord::skipdata ( std::istream &  is)

only read header and blockettes, no data

Note
Apparently this function is not used at all. It probably is useless, because datrw::mseed::imseedstream::read requires to extract block data in order to control whether data is contiguous. With some data the amount of actual samples and the amount of data blocks required to store them is only well established after decoding all data frames.
Deprecated:
This function appears obsolete and might be removed in the future.

Definition at line 60 of file mseedread_mseedrecord_skipdata.cc.

References datrw::mseed::MiniSEEDblock::bytesize(), Mblockette1000, Mdata, Mvalid, readheader(), and datrw::mseed::SEED::DataOnlySEEDBlockette::reclenbytes().

61  {
62  // create block to read MiniSEED
63  MiniSEEDblock block=this->readheader(is);
64  // count blocks
65  int iblock=0;
66 
67  if (Mvalid)
68  {
69  // data header is present
70  ++iblock;
71 
72  // size of record in bytes
73  int reclen=Mblockette1000.reclenbytes();
74  // number of blocks to read for full record
75  int nblocks=reclen/block.bytesize();
76  Mdata=Tseries(0,1);
77 
78  // extract samples
79  // ---------------
80  while (iblock < nblocks)
81  {
82  is >> block;
83  if (is.bad())
84  {
85  std::cerr << "WARNING (reading MiniSEED record): "
86  << "input stream is bad!" << std::endl;
87  }
88  ++iblock;
89  }
90 
91  // finished successfully
92  if (is.good()) { Mvalid=true; }
93  }
94  } // void MiniSEEDRecord::skipdata(std::istream& is)
MiniSEEDblock readheader(std::istream &is)
read header and return block
aff::Series< Tvalue > Tseries
type of container for sample data
Definition: mseedread.h:159
Tseries Mdata
Container for sample data.
Definition: mseedread.h:245
SEED::DataOnlySEEDBlockette Mblockette1000
Data Only SEED Blockette.
Definition: mseedread.h:239
bool Mvalid
contains valid data
Definition: mseedread.h:227
Here is the call graph for this function: