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

◆ read_sac_data()

Tseries datrw::sac::read_sac_data ( std::istream &  is,
const int &  nsamples 
)

read samples from file

Definition at line 72 of file sacread.cc.

References DATRW_assert, and datrw::hpmo::nsamples.

Referenced by datrw::isacstream::fseries().

73  {
74  Tseries series(nsamples);
75  DATRW_assert(is.good(),
76  "read_sac_data: input stream is not good before reading");
77  typedef char* Pchar;
78  is.read(Pchar(series.pointer()), nsamples*sizeof(Tvalue));
79  DATRW_assert(is.good(),
80  "read_sac_data: input stream is not good after reading");
81  return(series);
82  }
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
aff::Series< double > Tseries
Definition: sfftest.cc:47
const int nsamples
number of samples per minute block and channel
Definition: hpmodata.h:51
int Tvalue
Definition: pdasread.h:75
Here is the caller graph for this function: