114 "usage: binarytest [-v] [-iotest file] [-skip]" "\n" 115 " or: binarytest --help|-h" "\n" 123 "-iotest file execute fixed I/O test with file \"file\"\n" 124 "-skip skip samples of series, just count\n" 128 using namespace tfxx::cmdline;
129 static Declare options[]=
138 {
"iotest",arg_yes,
"-"},
145 cerr << usage_text << endl;
150 Commandline cmdline(iargc, argv, options);
153 if (cmdline.optset(0))
155 cerr << usage_text << endl;
156 cerr << help_text << endl;
163 opt.
iotest=cmdline.optset(3);
164 opt.
iofile=cmdline.string_arg(3);
198 for (
int i=iseries.f(); i<=iseries.l(); ++i)
200 for (
int i=dseries.f(); i<=dseries.l(); ++i)
201 { dseries(i)=double(i)*i; }
202 for (
int i=fseries.f(); i<=fseries.l(); ++i)
203 { fseries(i)=sin((i-fseries.f())*2.
204 *3.141592653589793115998/(fseries.size()-1)); }
212 wid2.date=libtime::TAbsoluteTime(2010,5,6,18,23,12,13,14);
216 wid2.instype=
"my seismometer type";
226 srce.type=
"my source type for this test";
227 srce.date=libtime::TAbsoluteTime(2006,1,1,9,15,12,345,678);
230 free.append(
"my free comment line");
238 const char*
const magic=
"B123";
241 std::ofstream ofs(opt.
iofile.c_str(),
242 std::ios_base::out|std::ios_base::binary);
258 std::ifstream ifs(opt.
iofile.c_str(),
259 std::ios_base::in|std::ios_base::binary);
272 cout <<
"skipped " << is.skipfseries() <<
" samples" << endl;
287 cout <<
"skipped " << is.skipdseries() <<
" samples" << endl;
302 values(
char(fflags), inflags);
304 values(
char(tflags), inflags);
308 cout <<
"skipped " << is.skipiseries() <<
" samples" << endl;
aff::Series< float > Tfseries
void values(const char &out, const char &in)
const char *const magic
magic number to identify file type and bytesex
aff::Series< double > Tdseries
binary output for basic types and classes
aff::Series< int > Tiseries
stream like class for binary input of basic types and classes
#define BINARYTEST_VERSION
void reportseries(const C &out, const C &in)
void reportsff(const C &out, const C &in)