SFF++ library: reading and writing SFF from C++
sffxx.cc File Reference

SFF library (implementation) More...

#include <sstream>
#include <sffxx.h>
#include <gsexx.h>
#include <cstdio>
#include <cmath>
#include <stdlib.h>
Include dependency graph for sffxx.cc:

Go to the source code of this file.

Namespaces

 sff
 all SFF modules
 
 sff::helper
 

Macros

#define TF_SFFXX_CC_VERSION   "TF_SFFXX_CC V1.19"
 

Functions

template<class C >
bool sff::helper::IDmatch (const std::string &line, const bool &debug=false)
 Check GSE identifier at beginning of line. More...
 
char sff::coosysID (const Ecoosys &csid)
 
Ecoosys sff::coosysID (const char &csid)
 

Detailed Description

SFF library (implementation)


Author
Thomas Forbriger
Date
21/12/2003

SFF library (implementation)


libsffxx is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach)

REVISIONS and CHANGES

  • 21/12/2003 V1.0 Thomas Forbriger
  • 23/02/2004 V1.1 changed DAST and STAT reading code there are not necessarily any flag characters
  • 07/04/2004 V1.2
    - provide debug output
    • correct reading of FREE block
  • 23/12/2004 V1.3 added full block append to FREE
  • 26/01/2004 V1.4 SRCE reading and INFO reading was not satisfactory
  • 15/03/2005 V1.5
    - made SRCE date and time reading more robust against whitespace
    • added some debug output
    • check SFF file type version to be at least 1.10
  • 27/03/2006 V1.6 allow reading of V1.09 files introduced sff::STAT::decode_libversion
  • 27/06/2006 V1.7 added INFO comparison
  • 24/07/2006 V1.8 - provide millisecond precision
    • field Fseconds was removed from GSE2::waveform::TWID2
  • 19/06/2007 V1.9 - SRCE line fields were not read correctly
    • modified all reading functions to use substr() function of class string to read fields from correct position
  • 29/06/2007 V1.10 - read SRCE line prior to file FREE block
  • 03/07/2007 V1.11 - read FREE block prior to file SRCE line order of elements in file header should not be defined by the order of the code characters since reading functions in libsffxx do not respect this order. libstuff always writes the FREE block first in sff_WOpenFS
  • 17/12/2007 V1.12 - modified output format (printf), since underlying Fortran code of libtime does no longer use long int
  • 13/04/2010 V1.13
    - round time correctly to milliseconds when writing WID2 line
    • WIDX reading is now transparent

19/07/2010 V1.14 - Daniel Armbruster: cast of values to int in void STAT::setstamp(const libtime::TAbsoluteTime& date) const

  • cast of values to int in std::string SRCE::line() const
  • adding header <stdlib.h> for function atoi

18/11/2010 V1.15 - increased format version to 2.00 The C++ format with DAST being -1 is a significant change, which was not reflected by the version number. Version 1.10 exists in parallel at Bochum and just indicates an increased character buffer size in the Fortran version.

  • 21/11/2011 V1.16 - waveform normalizer now limits the maximum value to 2**27-1 which matches the settings in libgsexx
  • 06/12/2011 V1.17 - waveform normalizer now limits the maximum value to 2**25-1 which ensure that the maximum second difference is smaller than 2**27. The settings in V1.16 were due to a wrong interpretation of libgsexx limits. This this provides the full dynamic range of 24bit data acquisition systems to be stored without round-off.
  • 17/02/2012 V1.18 - properly round date of first sample to microseconds when passing to libgsexx
  • 14/02/2017 V1.19 - limit number of characters in string fields upon assembling SFF header lines from C++ strings

Definition in file sffxx.cc.