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

correction

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: 2118
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2e442fb2
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: mseedread.cc,v 1.20 2006-05-10 11:48:15 tforb Exp $
* $Id: mseedread.cc,v 1.21 2006-05-11 14:02:38 tforb Exp $
* \author Thomas Forbriger
* \date 15/07/2004
*
......@@ -41,7 +41,7 @@
#define TF_MSEEDREAD_CC_VERSION \
"TF_MSEEDREAD_CC V1.3"
#define TF_MSEEDREAD_CC_CVSID \
"$Id: mseedread.cc,v 1.20 2006-05-10 11:48:15 tforb Exp $"
"$Id: mseedread.cc,v 1.21 2006-05-11 14:02:38 tforb Exp $"
#include <string>
#include <string.h>
......@@ -324,6 +324,8 @@ namespace datread {
{
sum += rframe.diff();
Mdata(isample)=sum;
// std::cout << "sample #" << isample << ": " << sum
// << " dif=" << rframe.diff() << std::endl;
++isample;
rframe.next();
}
......@@ -344,6 +346,8 @@ namespace datread {
}
++iblock;
}
// std::cout << "last sample: " << sum << std::endl;
// std::cout << "xn: " << xn << std::endl;
// check data integrity
DATREAD_assert((isample==nsamples),
"ERROR (reading MiniSEED record): "
......@@ -351,8 +355,6 @@ namespace datread {
DATREAD_assert((Mdata(isample-1)==xn),
"ERROR (reading MiniSEED record): "
"data is corrupt");
// std::cout << "last sample: " << sum << std::endl;
// std::cout << "xn: " << xn << std::endl;
// finished successfully
if (is.good()) { Mvalid=true; }
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seedstructdump.cc,v 1.14 2006-05-10 11:48:15 tforb Exp $
* $Id: seedstructdump.cc,v 1.15 2006-05-11 14:02:38 tforb Exp $
* \author Thomas Forbriger
* \date 15/03/2006
*
......@@ -35,7 +35,7 @@
#define TF_SEEDSTRUCTDUMP_CC_VERSION \
"TF_SEEDSTRUCTDUMP_CC V1.0 "
#define TF_SEEDSTRUCTDUMP_CC_CVSID \
"$Id: seedstructdump.cc,v 1.14 2006-05-10 11:48:15 tforb Exp $"
"$Id: seedstructdump.cc,v 1.15 2006-05-11 14:02:38 tforb Exp $"
#include<string>
#include<iomanip>
......@@ -448,9 +448,11 @@ namespace datread {
os.width(2);
os.fill('0');
os << i;
os << " c=";
os.width(2);
os.fill(' ');
os << f.ctrl(i);
os << " dnib=";
os.width(2);
os.fill(' ');
os << word.dnib();
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seedstructs.cc,v 1.7 2006-05-10 11:48:15 tforb Exp $
* $Id: seedstructs.cc,v 1.8 2006-05-11 14:02:39 tforb Exp $
* \author Thomas Forbriger
* \date 10/03/2006
*
......@@ -32,13 +32,14 @@
* REVISIONS and CHANGES
* - 10/03/2006 V1.0 Thomas Forbriger
* - 09/05/2006 V1.1 introduced Steim 2 code
* - 11/05/2006 V1.2 correction for reading bytes in Steim 2 Word
*
* ============================================================================
*/
#define TF_SEEDSTRUCTS_CC_VERSION \
"TF_SEEDSTRUCTS_CC V1.1 "
"TF_SEEDSTRUCTS_CC V1.2"
#define TF_SEEDSTRUCTS_CC_CVSID \
"$Id: seedstructs.cc,v 1.7 2006-05-10 11:48:15 tforb Exp $"
"$Id: seedstructs.cc,v 1.8 2006-05-11 14:02:39 tforb Exp $"
#include<datreadxx/seedstructs.h>
#include<datreadxx/error.h>
......@@ -330,7 +331,10 @@ namespace datread {
retval=Mword;
break;
case Steim2Word::Fbyte:
retval=this->extract(8,nval-i);
// bytes must be read in a different order
// since we do not swap this word
// which is consistent with decode_steim2.c in rdseed
retval=this->extract(8,i);
break;
case Steim2Word::Fdnib1:
switch (this->dnib()) {
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: mseedtest.cc,v 1.17 2006-05-09 17:09:14 tforb Exp $
* $Id: mseedtest.cc,v 1.18 2006-05-11 14:02:39 tforb Exp $
* \author Thomas Forbriger
* \date 15/07/2004
*
......@@ -31,13 +31,14 @@
* - 15/07/2004 V1.0 Thomas Forbriger
* - 04/04/2006 V1.1 handle special EDL data features
* - 09/05/2006 V1.2 support Steim 2 too
* - 11/05/2006 V1.3 generic frame dump
*
* ============================================================================
*/
#define MSEEDTEST_VERSION \
"MSEEDTEST V1.2 test mini-SEED reading"
"MSEEDTEST V1.3 test mini-SEED reading"
#define MSEEDTEST_CVSID \
"$Id: mseedtest.cc,v 1.17 2006-05-09 17:09:14 tforb Exp $"
"$Id: mseedtest.cc,v 1.18 2006-05-11 14:02:39 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -73,6 +74,7 @@ int main(int iargc, char* argv[])
"-reader use reading functions from mseedread" "\n"
"-skip skip data samples" "\n"
"-stream read data through stream" "\n"
"-generic use generic frame dump during raw test" "\n"
};
// define commandline options
......@@ -91,6 +93,8 @@ int main(int iargc, char* argv[])
{"skip",arg_no,"-"},
// 5: stream mode
{"stream",arg_no,"-"},
// 6: stream mode
{"generic",arg_no,"-"},
{NULL}
};
......@@ -137,6 +141,7 @@ int main(int iargc, char* argv[])
bool readermode=cmdline.optset(3);
bool skipmode=cmdline.optset(4);
bool streammode=cmdline.optset(5);
bool genericframedump=cmdline.optset(6);
if (verbosemode) { cout << "in verbose modes" << endl; }
......@@ -303,7 +308,15 @@ int main(int iargc, char* argv[])
{
datread::mseed::SEED::Steim1Frame frame(block.block(pframe),
dodataswap);
datread::mseed::SEED::dump(frame, cout);
if (genericframedump)
{
datread::mseed::SEED::SteimFrame& gframe=frame;
datread::mseed::SEED::dump(gframe, cout);
}
else
{
datread::mseed::SEED::dump(frame, cout);
}
frame.reset();
while (frame.valid())
{
......@@ -315,7 +328,15 @@ int main(int iargc, char* argv[])
{
datread::mseed::SEED::Steim2Frame frame(block.block(pframe),
dodataswap);
datread::mseed::SEED::dump(frame, cout);
if (genericframedump)
{
datread::mseed::SEED::SteimFrame& gframe=frame;
datread::mseed::SEED::dump(gframe, cout);
}
else
{
datread::mseed::SEED::dump(frame, cout);
}
frame.reset();
while (frame.valid())
{
......
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