TSIO++ Time series input/output

◆ read() [2/2]

template<class C >
void ts::sff::File< C >::read ( datrw::idatstream &  is,
const Trangelist rl,
const bool &  verbose = false 
)
inline

Read a data file an extract selected traces.

Definition at line 69 of file sfftsfileread.h.

72  {
73  is >> this->fileheader;
74  int itrace=0;
75  while (is.good())
76  {
77  ++itrace;
78  if ((rl.size()==0) || rl.contains(itrace))
79  {
80  if (verbose)
81  { std::cout << " * read trace #" << itrace << std::endl; }
82  Ttimeseries timeseries;
83  is >> timeseries;
84  timeseries.settraceindex(itrace);
85  this->push_back(timeseries);
86  }
87  else
88  {
89  if (verbose)
90  { std::cout << " skip trace #" << itrace << std::endl; }
91  is.skipseries();
92  }
93  }
94  } // File<C>::read
FileHeader fileheader
Definition: sfftsfile.h:77
Tbase::Ttimeseries Ttimeseries
Definition: sfftsfile.h:70
void settraceindex(int ti)
set trace index member data