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

◆ tchannelid()

TSOFTchannelid datrw::tsoft::tchannelid ( const Channel ci)

split TSOFT channel description

Definition at line 175 of file channeltranslation.cc.

References DATRW_assert, datrw::tsoft::TSOFTchannelid::location, stringtovec(), and datrw::tsoft::Channel::TSOFTname.

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

176  {
177  std::string tci(ci.TSOFTname);
178  Tvos vos=stringtovec(tci, ":");
179  DATRW_assert(vos.size()==3, "unexpected number of fields");
180  TSOFTchannelid retval;
181  retval.location=vos[0];
182  retval.instrument=vos[1];
183  retval.datatype=vos[2];
184  return(retval);
185  } // TSOFTchannelid tchannelid(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: