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

◆ schannelid()

SFFchannelid datrw::tsoft::schannelid ( const Channel ci)

split SFF channel description

Definition at line 189 of file channeltranslation.cc.

References DATRW_assert, datrw::tsoft::Channel::SFFname, datrw::tsoft::SFFchannelid::station, and stringtovec().

Referenced by channel(), reporttranslation(), translate(), and translationisunique().

190  {
191  std::string sci(ci.SFFname);
192  Tvos vos=stringtovec(sci, ":");
193  DATRW_assert(vos.size()==4, "unexpected number of fields");
194  SFFchannelid retval;
195  retval.station=vos[0];
196  retval.channel=vos[1];
197  retval.instrument=vos[2];
198  retval.auxid=vos[3];
199  return(retval);
200  } // SFFchannelid schannelid(const Channel& ci)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
std::vector< std::string > Tvos
vector of strings.
Definition: tsoftdata.h:104
Tvos stringtovec(const std::string &line, const std::string &delimiters)
helper function stringtok
Definition: tsoftdata.cc:341
Here is the call graph for this function:
Here is the caller graph for this function: