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

◆ read_gse_data()

Tiseries datrw::gse::read_gse_data ( std::istream &  is,
const int &  nsamples 
)

read samples from file

Definition at line 92 of file gseread.cc.

References datrw::hpmo::nsamples.

Referenced by datrw::igsestream::iseries().

93  {
94  Tiseries retval;
95  typedef Tiseries::Tvalue Tvalue;
96  try
97  {
98  retval=Tiseries(nsamples);
99  }
100  catch(...)
101  {
102  std::cerr << "ERROR (datrw::gse::read_gse_data): "
103  << "allocating series for "
104  << nsamples << " samples!" << std::endl;
105  throw;
106  }
107  // WID2 reading checks for CM6 subformat
108  // (only subformat supported so far)
109  GSE2::waveform::TDAT2readCM6 freader(nsamples);
110  for(aff::Iterator<Tiseries> i(retval); i.valid(); ++i)
111  { (*i) = Tvalue(freader(is)); }
112  return(retval);
113  }
aff::Series< Tivalue > Tiseries
Definition: gseread.h:63
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: