Commit 22b79c74 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: 1598
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a1fbeb19
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.15 2004-12-22 14:19:35 tforb Exp $
# $Id: Makefile,v 1.16 2004-12-22 17:17:40 tforb Exp $
#
# Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
#
......@@ -16,7 +16,7 @@ HEADERS=$(wildcard *.h */*.h)
HEADERS=datread.h bonjer.h bonjer/readbonjer.h readany.h error.h \
pdas.h pdas/pdasread.h pdas/pdasflags.h \
sff.h mseed.h mseed/mseedread.h mseed/seedstructs.h \
hpmo.h hpmo/readhpmo.h hpmo/hpmodata.h
hpmo.h hpmo/readhpmo.h hpmo/hpmodata.h util.h
#SRC=misc/fortranio.cc misc/commandline.cc misc/ioswap.cc misc/error.cc \
# misc/blitzfortranio.cc hacks/hack_blitztogrepg.cc
......@@ -24,7 +24,8 @@ LIBSRC=$(wildcard *.cc */*.cc)
LIBSRC=datread.cc bonjer/bonjer.cc bonjer/readbonjer.cc readany.cc error.cc \
pdas/pdas.cc pdas/pdasread.cc tests/pdastest.cc \
sff/sff.cc mseed/mseedread.cc mseed/mseed.cc tests/mseedtest.cc \
hpmo/hpmo.cc hpmo/readhpmo.cc tests/hpmotest.cc hpmo/hpmodata.cc
hpmo/hpmo.cc hpmo/readhpmo.cc tests/hpmotest.cc hpmo/hpmodata.cc \
util.cc
INCINSTALLPATH=$(LOCINCLUDEDIR)/datreadxx
LIBINSTALLPATH=$(LOCLIBDIR)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: hpmo.h,v 1.5 2004-12-22 15:10:14 tforb Exp $
* $Id: hpmo.h,v 1.6 2004-12-22 17:17:40 tforb Exp $
* \author Thomas Forbriger
* \date 31/03/2004
*
......@@ -23,7 +23,7 @@
#define DATREAD_HPMO_H_VERSION \
"DATREAD_HPMO_H V1.0 "
#define DATREAD_HPMO_H_CVSID \
"$Id: hpmo.h,v 1.5 2004-12-22 15:10:14 tforb Exp $"
"$Id: hpmo.h,v 1.6 2004-12-22 17:17:40 tforb Exp $"
#include<datreadxx/datread.h>
#include<datreadxx/hpmodata.h>
......@@ -45,6 +45,8 @@ namespace datread {
virtual Tiseries iseries();
virtual void skipseries();
private:
//! read one data file
void read(std::istream& is, const bool& verbose=false);
//! buffer to hold one data file
datread::hpmo::MinuteBlock Mdatafile[datread::hpmo::nminutes];
int Mindex[datread::hpmo::nminutes]; //<! index to contiguous blocks
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: hpmo.cc,v 1.2 2004-03-31 07:53:32 tforb Exp $
* $Id: hpmo.cc,v 1.3 2004-12-22 17:17:41 tforb Exp $
* \author Thomas Forbriger
* \date 31/03/2004
*
......@@ -19,12 +19,34 @@
#define DATREAD_HPMO_CC_VERSION \
"DATREAD_HPMO_CC V1.0 "
#define DATREAD_HPMO_CC_CVSID \
"$Id: hpmo.cc,v 1.2 2004-03-31 07:53:32 tforb Exp $"
"$Id: hpmo.cc,v 1.3 2004-12-22 17:17:41 tforb Exp $"
#include <datreadxx/datread.h>
#include <datreadxx/util.h>
#include <datreadxx/hpmo.h>
#include <datreadxx/readhpmo.h>
namespace datread {
ihpmostream::ihpmostream(std::istream& is): Tbase(is, true, true, true)
{ this->read(is); }
/*----------------------------------------------------------------------*/
Tiseries ihpmostream::iseries()
{ return(datread::util::convert<Tdseries, Tiseries>(this->dseries())); }
/*----------------------------------------------------------------------*/
Tfseries ihpmostream::fseries()
{ return(datread::util::convert<Tdseries, Tfseries>(this->dseries())); }
/*----------------------------------------------------------------------*/
void ihpmostream::read(std::istream& is, const bool& verbose)
{
}
} // namespace datread
/* ----- END OF hpmo.cc ----- */
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: hpmodata.h,v 1.2 2004-12-22 15:10:14 tforb Exp $
* $Id: hpmodata.h,v 1.3 2004-12-22 17:17:41 tforb Exp $
* \author Thomas Forbriger
* \date 22/12/2004
*
......@@ -23,7 +23,7 @@
#define DATREAD_HPMODATA_H_VERSION \
"DATREAD_HPMODATA_H V1.0 "
#define DATREAD_HPMODATA_H_CVSID \
"$Id: hpmodata.h,v 1.2 2004-12-22 15:10:14 tforb Exp $"
"$Id: hpmodata.h,v 1.3 2004-12-22 17:17:41 tforb Exp $"
#include<datreadxx/datread.h>
#include<string>
......@@ -33,11 +33,11 @@ namespace datread {
namespace hpmo {
//! number of channels in HP MO data acquisition system
const nchannels=20;
const int nchannels=20;
//! number of samples per minute block and channel
const nsamples=12;
const int nsamples=12;
//! number of minute blocks per file (1h)
const nminutes=60;
const int nminutes=60;
//! hold one minute block
struct MinuteBlock {
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: readhpmo.cc,v 1.7 2004-12-22 15:10:14 tforb Exp $
* $Id: readhpmo.cc,v 1.8 2004-12-22 17:17:41 tforb Exp $
* \author Thomas Forbriger
* \date 31/03/2004
*
......@@ -19,7 +19,7 @@
#define DATREAD_READHPMO_CC_VERSION \
"DATREAD_READHPMO_CC V1.0 "
#define DATREAD_READHPMO_CC_CVSID \
"$Id: readhpmo.cc,v 1.7 2004-12-22 15:10:14 tforb Exp $"
"$Id: readhpmo.cc,v 1.8 2004-12-22 17:17:41 tforb Exp $"
#include <datreadxx/error.h>
#include <datreadxx/readhpmo.h>
......@@ -59,7 +59,8 @@ namespace datread {
{
os << "Header: " << this->headerline() << std::endl;
os << " " << this->time().timestring() << std::endl;
os << " Error flag: " << this->errorstring() << std::endl;
os << " Error flag: "
<< datread::hpmo::quality(this->Merrorflag) << std::endl;
} // void Header::dump(std::ostream& os) const
/*----------------------------------------------------------------------*/
......
/*! \file util.cc
* \brief utilities used by more than one type of data reader (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id: util.cc,v 1.1 2004-12-22 17:17:40 tforb Exp $
* \author Thomas Forbriger
* \date 22/12/2004
*
* utilities used by more than one type of data reader (implementation)
*
* Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 22/12/2004 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define DATREAD_UTIL_CC_VERSION \
"DATREAD_UTIL_CC V1.0 "
#define DATREAD_UTIL_CC_CVSID \
"$Id: util.cc,v 1.1 2004-12-22 17:17:40 tforb Exp $"
#include <datreadxx/util.h>
namespace datread {
namespace util {
} // namespace util
} // namespace datread
/* ----- END OF util.cc ----- */
/*! \file util.h
* \brief utilities used by more than one type of data reader (prototypes)
*
* ----------------------------------------------------------------------------
*
* $Id: util.h,v 1.1 2004-12-22 17:17:41 tforb Exp $
* \author Thomas Forbriger
* \date 22/12/2004
*
* utilities used by more than one type of data reader (prototypes)
*
* Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 22/12/2004 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef DATREAD_UTIL_H_VERSION
#define DATREAD_UTIL_H_VERSION \
"DATREAD_UTIL_H V1.0 "
#define DATREAD_UTIL_H_CVSID \
"$Id: util.h,v 1.1 2004-12-22 17:17:41 tforb Exp $"
namespace datread {
namespace util {
/*----------------------------------------------------------------------*/
//! function template to convert a whole series
template<class Cin, class Cout>
Cout convert(const typename Cin::Tcoc& data)
{
int nsamples=data.size();
Cout retval(nsamples);
typedef typename Cin::Tvalue Tinvalue;
typedef typename Cout::Tvalue Toutvalue;
for (int i=0; i<nsamples; ++i)
{
Tinvalue sample=data(i);
retval(i)=Toutvalue(sample);
}
return(retval);
}
/*----------------------------------------------------------------------*/
} // namespace util
} // namespace datread
#endif // DATREAD_UTIL_H_VERSION (includeguard)
/* ----- END OF util.h ----- */
Supports Markdown
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