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

proceeding

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: 2115
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent bdb34584
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seedstructdump.cc,v 1.12 2006-05-09 17:04:02 tforb Exp $
* $Id: seedstructdump.cc,v 1.13 2006-05-09 17:09:14 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.12 2006-05-09 17:04:02 tforb Exp $"
"$Id: seedstructdump.cc,v 1.13 2006-05-09 17:09:14 tforb Exp $"
#include<string>
#include<iomanip>
......@@ -328,7 +328,7 @@ namespace datread {
/*----------------------------------------------------------------------*/
void dump(const Steim1Frame& f, std::ostream& os)
void dump(Steim1Frame f, std::ostream& os)
{
os << "Steim 1 Frame:" << std::endl;
os << " control word: 0x";
......@@ -391,11 +391,11 @@ namespace datread {
break;
}
}
} // void dump(const Steim1Frame& f, std::ostream& os)
} // void dump(Steim1Frame f, std::ostream& os)
/*----------------------------------------------------------------------*/
void dump(const Steim2Frame& f, std::ostream& os)
void dump(Steim2Frame f, std::ostream& os)
{
os << "Steim 2 Frame:" << std::endl;
os << " control word: 0x";
......@@ -460,11 +460,11 @@ namespace datread {
break;
}
}
} // void dump(const Steim2Frame& f, std::ostream& os)
} // void dump(Steim2Frame f, std::ostream& os)
/*----------------------------------------------------------------------*/
void dump(const SteimFrame& f, std::ostream& os)
void dump(SteimFrame f, std::ostream& os)
{
os << "Steim Frame:" << std::endl;
os << " control word: 0x";
......@@ -492,7 +492,7 @@ namespace datread {
os << " " << f.value() << std::endl;
f.next();
}
} // void dump(const SteimFrame& f, std::ostream& os)
} // void dump(SteimFrame f, std::ostream& os)
} // namespace SEED
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: seedstructdump.h,v 1.6 2006-05-09 17:04:03 tforb Exp $
* $Id: seedstructdump.h,v 1.7 2006-05-09 17:09:14 tforb Exp $
* \author Thomas Forbriger
* \date 15/03/2006
*
......@@ -40,7 +40,7 @@
#define TF_SEEDSTRUCTDUMP_H_VERSION \
"TF_SEEDSTRUCTDUMP_H V1.1"
#define TF_SEEDSTRUCTDUMP_H_CVSID \
"$Id: seedstructdump.h,v 1.6 2006-05-09 17:04:03 tforb Exp $"
"$Id: seedstructdump.h,v 1.7 2006-05-09 17:09:14 tforb Exp $"
#include<iostream>
#include<datreadxx/seedstructs.h>
......@@ -66,9 +66,9 @@ namespace datread {
void dump_ioflags(const unsigned char& s, std::ostream& os);
void dump(const EEncodingFormat& e, std::ostream& os);
void dump(const EByteOrder& e, std::ostream& os);
void dump(const SteimFrame& f, std::ostream& os);
void dump(const Steim1Frame& f, std::ostream& os);
void dump(const Steim2Frame& f, std::ostream& os);
void dump(SteimFrame f, std::ostream& os);
void dump(Steim1Frame f, std::ostream& os);
void dump(Steim2Frame f, std::ostream& os);
} // namespace SEED
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: mseedtest.cc,v 1.16 2006-05-03 12:09:28 tforb Exp $
* $Id: mseedtest.cc,v 1.17 2006-05-09 17:09:14 tforb Exp $
* \author Thomas Forbriger
* \date 15/07/2004
*
......@@ -30,13 +30,14 @@
* REVISIONS and CHANGES
* - 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
*
* ============================================================================
*/
#define MSEEDTEST_VERSION \
"MSEEDTEST V1.1 test mini-SEED reading"
"MSEEDTEST V1.2 test mini-SEED reading"
#define MSEEDTEST_CVSID \
"$Id: mseedtest.cc,v 1.16 2006-05-03 12:09:28 tforb Exp $"
"$Id: mseedtest.cc,v 1.17 2006-05-09 17:09:14 tforb Exp $"
#include <fstream>
#include <iostream>
......@@ -241,11 +242,12 @@ int main(int iargc, char* argv[])
bool dodataswap=datread::mseed::needswap(blockette1000.bytesex);
if (!dodataswap) { cout << "do not "; }
cout << "swap bytes, when reading data" << endl;
if (blockette1000.format == datread::mseed::SEED::steim1)
if ((blockette1000.format == datread::mseed::SEED::steim1) ||
(blockette1000.format == datread::mseed::SEED::steim2))
{
unsigned int isamples=0;
int nframes=(blockette1000.reclenbytes()-dataheader.dbeg)/
datread::mseed::SEED::Steim1Frame::blocksize;
datread::mseed::SEED::SteimFrame::blocksize;
cout << "total number of possible frames in record: "
<< nframes << endl;
if (foundBlockette1001)
......@@ -297,22 +299,37 @@ int main(int iargc, char* argv[])
cout << std::endl;
if (isamples < dataheader.nsamp)
{
datread::mseed::SEED::Steim1Frame frame(block.block(pframe),
dodataswap);
datread::mseed::SEED::dump(frame, cout);
datread::mseed::SEED::Steim1Reader scan(frame);
while (scan.valid())
if (blockette1000.format == datread::mseed::SEED::steim1)
{
++isamples;
scan.next();
datread::mseed::SEED::Steim1Frame frame(block.block(pframe),
dodataswap);
datread::mseed::SEED::dump(frame, cout);
frame.reset();
while (frame.valid())
{
++isamples;
frame.next();
}
}
else
{
datread::mseed::SEED::Steim2Frame frame(block.block(pframe),
dodataswap);
datread::mseed::SEED::dump(frame, cout);
frame.reset();
while (frame.valid())
{
++isamples;
frame.next();
}
}
}
pframe += datread::mseed::SEED::Steim1Frame::blocksize;
pframe += datread::mseed::SEED::SteimFrame::blocksize;
}
}
else
{
cout << "Not steim1 format!" << std::endl;
cout << "Not steim1 or steim2 format!" << std::endl;
}
}
else
......
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