Commit b534532b authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new feature

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2153
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent dc063d42
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: mseedtest.cc,v 1.21 2006-07-07 11:19:51 tforb Exp $
* $Id: mseedtest.cc,v 1.22 2006-07-07 14:57:10 tforb Exp $
* \author Thomas Forbriger
* \date 15/07/2004
*
......@@ -39,7 +39,7 @@
#define MSEEDTEST_VERSION \
"MSEEDTEST V1.4 test MiniSEED reading"
#define MSEEDTEST_CVSID \
"$Id: mseedtest.cc,v 1.21 2006-07-07 11:19:51 tforb Exp $"
"$Id: mseedtest.cc,v 1.22 2006-07-07 14:57:10 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -62,7 +62,7 @@ int main(int iargc, char* argv[])
{
MSEEDTEST_VERSION "\n"
"usage: mseedtest [-v] [-raw] [-reader] [-skip] [-stream]" "\n"
" [-nfinconsist]" "\n"
" [-nfinconsist] [-dumpsamples]" "\n"
" file [file...]" "\n"
" or: mseedtest --help|-h" "\n"
};
......@@ -78,6 +78,7 @@ int main(int iargc, char* argv[])
"-stream read data through stream" "\n"
"-generic use generic frame dump during raw test" "\n"
"-nfinconsist make inconsistencies non fatal errors" "\n"
"-dumpsamples dump sample values in reader mode" "\n"
};
// define commandline options
......@@ -100,6 +101,8 @@ int main(int iargc, char* argv[])
{"generic",arg_no,"-"},
// 7: stream mode
{"nfinconsist",arg_no,"-"},
// 8: dump samples in reader mode
{"dumpsamples",arg_no,"-"},
{NULL}
};
......@@ -151,6 +154,8 @@ int main(int iargc, char* argv[])
datread::mseed::Debug MiniSEEDdebug;
MiniSEEDdebug.inconsistencies_are_not_fatal=cmdline.optset(7);
bool dumpsamples=cmdline.optset(8);
if (verbosemode)
{
cout << MSEEDTEST_VERSION << endl;
......@@ -447,6 +452,15 @@ int main(int iargc, char* argv[])
<< data(data.f()) << endl;
cout << " last sample: "
<< data(data.l()) << endl;
if (dumpsamples)
{
cout << "BEGIN OF DUMP: data values" << endl;
for (int i=data.f(); i<=data.l(); ++i)
{
cout << data(i) << endl;
}
cout << "END OF DUMP: data values" << endl;
}
}
{
cout << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment