GSE++ library: reading and writing GSE waveforms

◆ line()

std::string GSE2::waveform::TWID2::line ( ) const

write the WID2 line

Definition at line 74 of file gsexx_TWID2.cc.

References Fauxid, Fcalib, Fcalper, Fchannel, Fday, Fhang, Fhour, Finstype, Fmilsec, Fminute, Fmonth, Fsamprate, Fsamps, Fstation, Fvang, Fyear, GSEID, and subformat().

Referenced by main(), and GSE2::tests::test_dat2cm6().

75 {
76  // buffer size
77  const int bufsize=135;
78  // character buffer
79  char charbuf[bufsize];
80  std::string datatype=subformat();
81  int isec=int(Fmilsec/1000);
82  int imsec=Fmilsec-(1000*isec);
83  sprintf(charbuf, "%-4s %4.4i/%2.2i/%2.2i %2.2i:%2.2i:%2.2i.%3.3i "
84  "%-5s %-3s %-4s %-3s %8i %11.6f %10.2e %7.3f %-6s %5.1f %4.1f\n",
86  Fhour, Fminute, isec, imsec,
87  Fstation.substr(0,5).c_str(),
88  Fchannel.substr(0,3).c_str(),
89  Fauxid.substr(0,4).c_str(),
90  datatype.substr(0,3).c_str(),
92  Finstype.substr(0,6).c_str(),
93  Fhang, Fvang);
94  std::string retval(charbuf);
95  return(retval);
96 }
std::string Finstype
instrument type
Definition: gsexx.h:146
std::string Fchannel
FDSN channel code.
Definition: gsexx.h:139
double Fcalib
calibration factor
Definition: gsexx.h:144
double Fsamprate
sampling rate (Hz)
Definition: gsexx.h:143
int Fhour
hour of time
Definition: gsexx.h:135
static const char *const GSEID
GSE line idetifier.
Definition: gsexx.h:114
int Fminute
minute of time
Definition: gsexx.h:136
int Fyear
year of date
Definition: gsexx.h:132
int Fmonth
month of date
Definition: gsexx.h:133
std::string Fauxid
Auxiliary identification code.
Definition: gsexx.h:140
int Fsamps
number of samples
Definition: gsexx.h:142
int Fday
day of date
Definition: gsexx.h:134
double Fhang
horizontal orientation
Definition: gsexx.h:147
std::string Fstation
Station code.
Definition: gsexx.h:138
std::string subformat() const
return subformat ID string
Definition: gsexx_TWID2.cc:58
double Fcalper
calibration reference period
Definition: gsexx.h:145
double Fvang
veritcal orientation This field is required to obtain millisecond precision
Definition: gsexx.h:148
Here is the call graph for this function:
Here is the caller graph for this function: