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

◆ read()

void datrw::seife::Header::read ( std::istream &  is)

read header from input

Definition at line 141 of file seifeio.cc.

References DATRW_assert, Mfree, Mparameters, and datrw::seife::ParameterLine::set().

Referenced by Header().

142  {
143  std::string line;
144  DATRW_assert(is.good(),
145  "ERROR (seife::Header::read): input stream is not good");
146  getline(is, line);
147  Mfree.append(line);
148  DATRW_assert(is.good(),
149  "ERROR (seife::Header::read): input stream is not good");
150  getline(is, line);
151  while (line.substr(0,1) == "%")
152  {
153  Mfree.append(line.substr(1));
154  DATRW_assert(is.good(),
155  "ERROR (seife::Header::read): input stream is not good");
156  getline(is, line);
157  }
158  Mparameters.set(line);
159  } // void Header::read(std::istream& is)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
ParameterLine Mparameters
numerical header parameters
Definition: seifeio.h:158
::sff::FREE Mfree
comments
Definition: seifeio.h:160
void set(const std::string &line)
set values from line
Definition: seifeio.cc:56
Here is the call graph for this function:
Here is the caller graph for this function: