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

◆ readdata()

SampleBlock datrw::hpmo::readdata ( std::istream &  is,
const bool &  verbose 
)

read one minute block of samples

Definition at line 145 of file readhpmo.cc.

References DATRW_assert, datrw::hpmo::SampleBlock::Msamples, nchannels, and nsamples.

Referenced by operator>>().

146  {
147  SampleBlock retval;
148  int ninsamples=nsamples*nchannels;
149  for (int i=0; i<ninsamples; i++)
150  {
151  is >> retval.Msamples[i];
152  DATRW_assert(is.good(), "ERROR: reading samples!");
153  }
154  std::string dummy;
155  std::getline(is, dummy);
156  return(retval);
157  } // SampleBlock readdata(std::istream& is, const bool& verbose)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
const int nchannels
number of channels in HP MO data acquisition system
Definition: hpmodata.h:49
const int nsamples
number of samples per minute block and channel
Definition: hpmodata.h:51
Here is the caller graph for this function: