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

◆ wid2()

sff::WID2 datrw::su::SUheader::wid2 ( ) const

return WID2 line

Definition at line 309 of file suheader.cc.

References dateoffirstsample(), DATRW_assert, dt(), datrw::su::TraceHeaderStruct::fldr, Mheader, datrw::su::TraceHeaderStruct::ns, datrw::su::TraceHeaderStruct::tracf, and datrw::su::TraceHeaderStruct::trid.

Referenced by main(), datrw::isustream::readheader(), and set().

310  {
312  "ERROR (SUheader::wid2): no seismic data");
313  ::sff::WID2 retval;
314  retval.nsamples=Mheader.ns;
315  retval.dt=this->dt();
316  retval.date=this->dateoffirstsample();
317  std::ostringstream oss;
318  /* set channel and station to tracf:
319  * Trace number within original field record
320  */
321  oss.width(3); oss.fill('0'); oss << Mheader.tracf;
322  retval.channel=oss.str();
323  retval.station=oss.str();
324  oss.str("");
325  /* set auxid to fldr
326  * Original field record number
327  */
328  oss.width(3); oss.fill('0'); oss << Mheader.fldr;
329  retval.auxid=oss.str();
330  return(retval);
331  } // ::sff::WID2 SUheader::wid2() const
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
int fldr
Original field record number.
libtime::TAbsoluteTime dateoffirstsample() const
return date of first sample
Definition: suheader.cc:215
double dt() const
return sampling interval
Definition: suheader.cc:156
short trid
Trace identification code (see details).
unsigned short ns
number of samples in this trace
int tracf
Trace number within original field record.
TraceHeaderStruct Mheader
the actual data fields are provided for public access
Definition: suheader.h:239
Here is the call graph for this function:
Here is the caller graph for this function: