SFF++ library: reading and writing SFF from C++

◆ test_write_wrappers()

void test_write_wrappers ( )

Definition at line 168 of file sfftest.cc.

References sff::WID2::channel, sff::WID2::dt, sff::WID2::instype, sff::FREE::lines, sff::WID2::nsamples, and sff::WID2::station.

Referenced by main().

169 {
170  cout << "test write wrappers" << endl
171  << "-------------------" << endl;
172 
173  sff::SRCE mysrce;
174  sff::INFO myinfo;
175  sff::FREE myfree;
176  myfree.lines.push_back("auch ein text");
177  sff::WID2 mywid2;
178  mywid2.station="BFO";
179  mywid2.channel="UGZ";
180  mywid2.instype="ET-19";
181  mywid2.nsamples=2048;
182  mywid2.dt=10.;
183 
184  { cout << sff::FileHeader(); }
185  cout << endl << "next:" << endl;
186  { cout << sff::FileHeader(mysrce); }
187  cout << endl << "next:" << endl;
188  { cout << sff::FileHeader(myfree); }
189  cout << endl << "next:" << endl;
190  { cout << sff::FileHeader(mysrce, myfree); }
191 
192  cout << endl << "next:" << endl;
193  { cout << sff::TraceHeader(mywid2); }
194  cout << endl << "next:" << endl;
195  { cout << sff::TraceHeader(mywid2, myinfo); }
196  cout << endl << "next:" << endl;
197  { cout << sff::TraceHeader(mywid2, myfree); }
198  cout << endl << "next:" << endl;
199  { cout << sff::TraceHeader(mywid2, myinfo, myfree); }
200  cout << endl << "next:" << endl;
201  { cout << sff::TraceHeader(mywid2, myinfo,true); }
202 }
SFF trace header elements.
Definition: sffxx.h:282
Tlines lines
Definition: sffxx.h:163
std::string station
Station code.
Definition: sffxx.h:216
std::string instype
instrument type
Definition: sffxx.h:223
std::string channel
FDSN channel code.
Definition: sffxx.h:217
int nsamples
number of samples
Definition: sffxx.h:219
Waveform Header.
Definition: sffxx.h:209
double dt
sampling interval (sec)
Definition: sffxx.h:220
SFF file header elements.
Definition: sffxx.h:232
Here is the caller graph for this function: