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

◆ writetraceheader()

void datrw::obinarystream::writetraceheader ( const binary::Eflags datatype,
const unsigned int &  nsamples 
)
private

Definition at line 93 of file obinarystream.cc.

References DATRW_debug, DATRW_value, datrw::binary::Ffree, datrw::binary::Finfo, datrw::odatstream::free(), datrw::odatstream::hasfree(), datrw::odatstream::hasinfo(), datrw::odatstream::info(), datrw::odatstream::Mdebug, Mobs, datrw::hpmo::nsamples, and datrw::odatstream::wid2().

Referenced by writetrace().

95  {
96  char flags=datatype;
97  if (this->hasinfo()) { flags |= binary::Finfo; }
98  if (this->hasfree()) { flags |= binary::Ffree; }
99  DATRW_debug(Mdebug, "obinarystream::writetraceheader()",
100  "flags: " << DATRW_value( int(flags) ));
101  Mobs << flags;
102  ::sff::WID2 wid2=this->wid2();
103  wid2.nsamples=nsamples;
104  Mobs << wid2;
105  if (this->hasinfo()) { Mobs << this->info(); }
106  if (this->hasfree()) { Mobs << this->free(); }
107  } // void obinarystream::writetraceheader()
bool hasinfo() const
info is available
Definition: datwrite.h:182
binary::obinstream Mobs
Definition: binary.h:148
trace has INFO header
Definition: binary.h:81
sff::WID2 wid2() const
return WID2 data
Definition: datwrite.h:169
const int nsamples
number of samples per minute block and channel
Definition: hpmodata.h:51
sff::INFO info() const
return SRCE data
Definition: datwrite.h:173
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
trace has FREE header
Definition: binary.h:80
#define DATRW_value(V)
report value
Definition: debug.h:65
bool hasfree() const
free is available
Definition: datwrite.h:184
Here is the call graph for this function:
Here is the caller graph for this function: