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

◆ write()

void datrw::seife::Header::write ( std::ostream &  os) const

! write header to stream

Definition at line 163 of file seifeio.cc.

References DATRW_SEIFEIO_CC_VERSION, datrw::seife::ParameterLine::line(), Mfree, and Mparameters.

Referenced by main(), and datrw::oseifestream::writetraceheader().

164  {
165  typedef ::sff::FREE::Tlines Tlines;
166  const Tlines& lines=Mfree.lines;
167  if (lines.empty())
168  {
169  os << DATRW_SEIFEIO_CC_VERSION << std::endl;
170  }
171  else
172  {
173  Tlines::const_iterator I=lines.begin();
174  os << *I << std::endl;
175  ++I;
176  unsigned int nlines=0;
177  while ((I != lines.end()) && (nlines<48))
178  {
179  os << "%" << *I << std::endl;
180  ++I;
181  ++nlines;
182  }
183  }
184  os << Mparameters.line() << std::endl;
185  } // void Header::write(std::ostream& os) const
ParameterLine Mparameters
numerical header parameters
Definition: seifeio.h:158
::sff::FREE Mfree
comments
Definition: seifeio.h:160
#define DATRW_SEIFEIO_CC_VERSION
Definition: seifeio.cc:35
std::string line() const
create line for output from values
Definition: seifeio.cc:112
Here is the call graph for this function:
Here is the caller graph for this function: