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

◆ writefileheader()

void datrw::oasciistream::writefileheader ( )
protectedvirtual

actually write the file header

Reimplemented from datrw::odatstream.

Definition at line 91 of file oasciistream.cc.

References DATRW_debug, FOUT, datrw::odatstream::free(), datrw::odatstream::hasfree(), datrw::odatstream::hassrce(), datrw::ascii::keySRCECS, datrw::ascii::keySRCEdate, datrw::ascii::keySRCEtype, datrw::ascii::keySRCEX, datrw::ascii::keySRCEY, datrw::ascii::keySRCEZ, datrw::odatstream::Mdebug, POUT, and datrw::odatstream::srce().

92  {
93  DATRW_debug(Mdebug, "oasciistream::writefileheader",
94  "entered function");
95  if (this->hasfree())
96  {
97  const ::sff::FREE& free=this->free();
98  ::sff::FREE::Tlines::const_iterator I=free.lines.begin();
99  while (I!=free.lines.end())
100  {
101  DATRW_debug(Mdebug, "oasciistream::writefileheader",
102  "line: " << *I);
103  FOUT( *I );
104  ++I;
105  }
106  }
107  DATRW_debug(Mdebug, "oasciistream::writefileheader",
108  "file FREE written if present");
109  if (this->hassrce())
110  {
111  ::sff::SRCE srce=this->srce();
112  POUT( ascii::keySRCEtype, srce.type );
113  POUT( ascii::keySRCEdate, srce.date.hierarchicalstring() );
114  POUT( ascii::keySRCEX, srce.cx );
115  POUT( ascii::keySRCEY, srce.cy );
116  POUT( ascii::keySRCEZ, srce.cz );
117  POUT( ascii::keySRCECS, ::sff::coosysID(srce.cs) );
118  }
119  DATRW_debug(Mdebug, "oasciistream::writefileheader",
120  "SRCE written if present");
121  } // void oasciistream::writefileheader()
const char *const keySRCEtype
key for SRCE line header field
Definition: ascii.cc:58
const char *const keySRCEY
key for SRCE line header field
Definition: ascii.cc:60
bool hassrce() const
srce is available
Definition: datwrite.h:180
sff::SRCE srce() const
return SRCE data
Definition: datwrite.h:171
const char *const keySRCEdate
key for SRCE line header field
Definition: ascii.cc:57
#define POUT(K, V)
Definition: oasciistream.cc:47
sff::FREE free() const
return FREE data
Definition: datwrite.h:175
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
bool Mdebug
global debug flag
Definition: datwrite.h:197
const char *const keySRCEX
key for SRCE line header field
Definition: ascii.cc:59
const char *const keySRCECS
key for SRCE line header field
Definition: ascii.cc:62
#define FOUT(V)
Definition: oasciistream.cc:48
bool hasfree() const
free is available
Definition: datwrite.h:184
const char *const keySRCEZ
key for SRCE line header field
Definition: ascii.cc:61
Here is the call graph for this function: