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

◆ reporttranslation()

void datrw::tsoft::reporttranslation ( std::ostream &  os)

report translation table

Definition at line 237 of file channeltranslation.cc.

References datrw::tsoft::SFFchannelid::auxid, datrw::tsoft::SFFchannelid::channel, datrw::tsoft::TSOFTchannelid::datatype, DATRW_assert, datrw::tsoft::TSOFTchannelid::instrument, datrw::tsoft::SFFchannelid::instrument, datrw::tsoft::TSOFTchannelid::location, pline(), schannelid(), datrw::tsoft::SFFchannelid::station, tchannelid(), translationtable, and datrw::tsoft::Channel::TSOFTname.

Referenced by datrw::itsoftstream::help(), and main().

238  {
239  const Channel* pc=translationtable;
240  os << "Translation table for TSOFT channels:" << std::endl;
241  pline(os, "TSOFT", "", "", "SFF", "", "", "");
242  pline(os, "location", "instrument", "datatype",
243  "station", "channel", "instrument", "auxid");
244  const char* line="----------";
245  pline(os, line, line, line, line, line, line, line);
246  while (pc->TSOFTname != NULL)
247  {
248  DATRW_assert(pc->TSOFTname != NULL, "UUPS");
249  TSOFTchannelid tci=tchannelid(*pc);
250  SFFchannelid sci=schannelid(*pc);
251  pline(os,
252  tci.location,
253  tci.instrument,
254  tci.datatype,
255  sci.station,
256  sci.channel,
257  sci.instrument,
258  sci.auxid);
259  ++pc;
260  }
261  os << "If none of the entries matches, we take location for station,\n"
262  << "instrument for instrument, and datatype for channel and auxid."
263  << std::endl;
264  } // void reporttranslation(std::ostream& os)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
const Channel translationtable[]
global variable: channel name translation tableThis table is specific for SG056 at BFO...
void pline(std::ostream &os, const std::string &s1, const std::string &s2, const std::string &s3, const std::string &s4, const std::string &s5, const std::string &s6, const std::string &s7)
helper function: formatted output
SFFchannelid schannelid(const Channel &ci)
split SFF channel description
TSOFTchannelid tchannelid(const Channel &ci)
split TSOFT channel description
Here is the call graph for this function:
Here is the caller graph for this function: