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

◆ writetrace() [1/3]

void datrw::oasciistream::writetrace ( const Tdseries::Tcoc &  series)
protectedvirtual

write double data

Reimplemented from datrw::odatstream.

Definition at line 125 of file oasciistream.cc.

References DATRW_debug, DATRW_value, datrw::ascii::keydouble, datrw::odatstream::Mdebug, datrw::odatstream::Mos, Mprecision, and writetraceheader().

126  {
127  DATRW_debug(Mdebug, "oasciistream::writetrace (double)",
128  DATRW_value(series.f()) << ", "
129  DATRW_value(series.l()) << ", "
131  this->writetraceheader(series.size(),ascii::keydouble);
132  for (int i=series.first(); i<=series.last(); ++i)
133  {
134  Mos.precision(Mprecision);
135  Mos << series(i) << "\n";
136  }
137  Mos.flush();
138  } // void oasciistream::writefileheader()
unsigned int Mprecision
floating point format precision
Definition: ascii.h:121
const char *const keydouble
key for DATA type header field
Definition: ascii.cc:73
std::ostream & Mos
output stream to be used by this class
Definition: datwrite.h:194
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
bool Mdebug
global debug flag
Definition: datwrite.h:197
void writetraceheader(const unsigned int &n, const char *type)
#define DATRW_value(V)
report value
Definition: debug.h:65
Here is the call graph for this function: