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

◆ set() [2/5]

void datrw::su::SUheader::set ( const ::sff::SRCE &  srce)

set values from SRCE line

Definition at line 336 of file suheader.cc.

References DATRW_assert, DATRW_debug, datrw::su::Coordinates::getvaluesfrom(), Mdebug, Mhassrce, Mheader, Mheadercontrol, Msrcedate, datrw::su::Coordinates::sdepth, datrw::su::ScalCoo::set(), settimes(), datrw::su::Coordinates::setvaluesin(), datrw::su::options::SUHeaderControl::spatialsampling, srce(), datrw::su::Coordinates::sx, and datrw::su::Coordinates::sy.

337  {
338  DATRW_debug(Mdebug, "SUheader::set(const ::sff::SRCE &srce)",
339  "set SRCE values:"
340  " cx: " << srce.cx <<
341  " cy: " << srce.cy <<
342  " cz: " << srce.cz);
343  DATRW_assert(srce.cs == ::sff::CS_cartesian,
344  "ERROR (SUheader::set SRCE): "
345  "can only handle cartesian cooridnates");
347  coo.getvaluesfrom(Mheader);
348  coo.sx.set(srce.cx);
349  coo.sy.set(srce.cy);
350  coo.sdepth.set(-srce.cz);
351  coo.setvaluesin(Mheader);
352  Msrcedate=srce.date;
353  Mhassrce=true;
354  this->settimes();
355  } // void SUheader::set(const ::sff::SRCE &srce)
bool Mhassrce
we received srce data
Definition: suheader.h:225
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
full set of coordinates.This struct holds a full set of coordinates for a SEG-Y trace header...
Definition: sucomanager.h:195
datrw::su::options::SUHeaderControl Mheadercontrol
all options taken from the user
Definition: suheader.h:202
bool Mdebug
be verbose
Definition: suheader.h:204
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
::sff::SRCE srce() const
return SRCE line
Definition: suheader.cc:275
void settimes()
set time values correctly
Definition: suheader.cc:426
libtime::TAbsoluteTime Msrcedate
date from SRCE line
Definition: suheader.h:231
TraceHeaderStruct Mheader
the actual data fields are provided for public access
Definition: suheader.h:239
Here is the call graph for this function: