Commit bc399b81 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: 2220
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent ff0f48d9
......@@ -4,7 +4,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: readtsdata.cc,v 1.4 2007-02-12 10:27:03 tforb Exp $
* $Id: readtsdata.cc,v 1.5 2007-02-12 10:58:50 tforb Exp $
* \author Thomas Forbriger
* \date 31/01/2007
*
......@@ -37,7 +37,7 @@
#define TF_READTSDATA_CC_VERSION \
"TF_READTSDATA_CC V1.0 "
#define TF_READTSDATA_CC_CVSID \
"$Id: readtsdata.cc,v 1.4 2007-02-12 10:27:03 tforb Exp $"
"$Id: readtsdata.cc,v 1.5 2007-02-12 10:58:50 tforb Exp $"
#include <tfxx/readtsdata.h>
......@@ -45,17 +45,19 @@ namespace tfxx {
namespace tsio {
//! read complete SFF file
DFile readDSFF(const std::string& filename)
DFile readDSFF(const std::string& filename,
const bool& verbose,
const datread::Eformat& format);
{
DFile::Trangelist rangelist;
return (readDSFF(filename, rangelist));
Ttracelist rangelist;
return (readDSFF(filename, rangelist, verbose, format));
}
/*----------------------------------------------------------------------*/
//! read complete SFF file with trace selection
DFile readDSFF(const std::string& filename,
const DFile::Trangelist& selection,
const Ttracelist& selection,
const bool& verbose,
const datread::Eformat& format)
{
......@@ -79,9 +81,8 @@ namespace tfxx {
Ttracelistkey tracekey,
const datread::Eformat& format)
{
DFile::Trangelist selection=
tfxx::string::rangelist<DFile::Trangelist::Tvalue>(
filename.value(tracekey));
Ttracelist selection=
tfxx::string::rangelist<Ttracelist::Tvalue>(filename.value(tracekey));
DFile retval=readDSFF(filename.name, selection, verbose, format);
retval.arguments=filename;
return(retval);
......
......@@ -4,7 +4,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: readtsdata.h,v 1.4 2007-02-12 10:27:04 tforb Exp $
* $Id: readtsdata.h,v 1.5 2007-02-12 10:58:50 tforb Exp $
* \author Thomas Forbriger
* \date 31/01/2007
*
......@@ -41,7 +41,7 @@
#define TF_READTSDATA_H_VERSION \
"TF_READTSDATA_H V1.0 "
#define TF_READTSDATA_H_CVSID \
"$Id: readtsdata.h,v 1.4 2007-02-12 10:27:04 tforb Exp $"
"$Id: readtsdata.h,v 1.5 2007-02-12 10:58:50 tforb Exp $"
#include<tfxx/rangelist.h>
#include<tfxx/xcmdline.h>
......@@ -73,50 +73,138 @@ namespace tfxx {
*/
namespace tsio {
//! type of trace selection list
/*! \brief type of trace selection list.
*
* \ingroup group_readtsdata, readtsdata_h
*
* This is the rangelist class that holds a selection of traces in
* numerical form. It can be generated generated from an approriate string
* on the command line through:
* \code
* Ttracelist selection=
* tfxx::string::rangelist<Ttracelist::Tvalue>(filename.value(tracekey));
* \endcode
*/
typedef tfxx::RangeList<int> Ttracelist;
//! type of trace selection key
/*! \brief type of trace selection key.
*
* \ingroup group_readtsdata, readtsdata_h
*
* This typedef is given here to make the argument definitions more
* verbose.
*/
typedef const char* Ttracelistkey;
//! structure to contain file data together with command line arguments
/*! \brief structure to contain file data together with command line
* arguments.
*
* \ingroup group_readtsdata, readtsdata_h
*
* A struct to hold a complete data file including
* -# command line arguments associated with the file
* -# the file header
* -# headers and samples from all selected traces
*
* This specific struct will hold samples in form of doubles.
*/
struct DFile {
// provides reading into doubles
//! provides reading into doubles
typedef double Tvalue;
// container to be used
//! container to be used
typedef aff::Series<Tvalue> Tseries;
// file container
//! file container
typedef ts::sff::File<Tseries> Tfile;
//! rangelist
typedef Tfile::Trangelist Trangelist;
// command line arguments
//! command line arguments
tfxx::cmdline::Filename arguments;
// container to hold samples
//! container to hold data headers and samples
ts::sff::File<Tseries> data;
}; // struct File
//! complete list of files
/*! \brief complete list of files.
*
* \ingroup group_readtsdata, readtsdata_h
*
* A list of DFile structs, to store all data files provided on the
* command line at once.
*/
typedef std::list<DFile> TDFileList;
//! read complete SFF file
DFile readDSFF(const std::string& filename);
/*! \brief read complete SFF file.
*
* \ingroup group_readtsdata, readtsdata_h
*
* Read a complete data file with headers and samples at once.
*
* \return structure that contains file data together with command line
* arguments
* \param filename input file name of file to be read
* \param verbose select verbosity
* \param format data format to be read
*/
DFile readDSFF(const std::string& filename,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
//! read complete SFF file with trace selection
/*! \brief read complete SFF file with trace selection.
*
* \ingroup group_readtsdata, readtsdata_h
*
* Read a complete data file with all headers and samples but only for the
* selected traces.
*
* \return structure that contains file data together with command line
* arguments (here: only file name)
* \param filename input file name of file to be read
* \param selection numerical list of selected traces
* \param verbose select verbosity
* \param format data format to be read
*/
DFile readDSFF(const std::string& filename,
const DFile::Trangelist& selection,
const Ttracelist& selection,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
//! read complete SFF file with trace selection
/*! \brief read complete SFF file with trace selection.
*
* \ingroup group_readtsdata, readtsdata_h
*
* Read a complete data file, but take selection from the structure of
* command line arguments.
*
* \return structure that contains file data together with command line
* arguments (here: only file name)
* \param filename input file name together with command line options and
* arguments
* \param verbose select verbosity
* \param tracekey key string for command line option that defines trace
* selection
* \param format data format to be read
*/
DFile readDSFF(const tfxx::cmdline::Filename& filename,
const bool& verbose=false,
Ttracelistkey="t",
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
//! read complete list of SFF files with trace selection
/*! \brief read complete list of SFF files with trace selection.
*
* \ingroup group_readtsdata, readtsdata_h
*
* Read a complete set of files like defined in the structure of command
* line arguments.
*
* \return structure that contains file data together with command line
* arguments
* \param flist list of file names together with
* command line options and arguments
* \param verbose select verbosity
* \param tracekey key string for command line option that defines trace
* selection
* \param format data format to be read
*/
TDFileList readDSFF(const tfxx::cmdline::Tparsed& flist,
const bool& verbose=false,
Ttracelistkey="t",
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
......
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