DATRW++ library: seismic data I/O with multiple formats
thiesdl1.h
Go to the documentation of this file.
1 /*! \file thiesdl1.h
2  * \brief module to read ThiesDL1 data files (prototypes)
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 13/09/2011
8  *
9  * module to read ThiesDL1 data files (prototypes)
10  *
11  * Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
12  *
13  * ----
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27  * ----
28  *
29  * REVISIONS and CHANGES
30  * - 13/09/2011 V1.0 Thomas Forbriger
31  * - 18/11/2016 V1.1 use debug flag in base class
32  *
33  * ============================================================================
34  */
35 
36 // include guard
37 #ifndef DATRW_THIESDL1_H_VERSION
38 
39 #define DATRW_THIESDL1_H_VERSION \
40  "DATRW_THIESDL1_H V1.1"
41 
42 #include <datrwxx/datread.h>
43 #include <datrwxx/thiesdl1file.h>
44 
45 namespace datrw {
46 
47  /*! \brief internals of the Thies DL1 reading module
48  *
49  * \ingroup group_thiesdl1
50  */
51  namespace thiesdl1 {
52 
53  extern const bool isbinary;
54  extern const char* const streamID;
55 
56  } // namespace thiesdl1
57 
58  /*----------------------------------------------------------------------*/
59 
60  /*! \brief class to read Thies DL1 data
61  *
62  * \ingroup group_thiesdl1
63  */
64  class ithiesdl1stream: public idatstream {
65  public:
66  typedef idatstream Tbase;
67  ithiesdl1stream(std::istream& is,
68  const std::string& modifier="",
69  const bool& debug=false);
70  virtual ~ithiesdl1stream() { }
71  virtual Tdseries dseries();
72  virtual Tfseries fseries();
73  virtual Tiseries iseries();
74  virtual void skipseries();
75  static void help(std::ostream& os=std::cout);
76  static const std::ios_base::openmode openmode;
77  private:
78  void settraceheader();
79  void readsamples();
80  std::string Mmodifier;
83  }; // class ithiesdl1stream
84 
85 } // namespace datrw
86 
87 
88 #endif // DATRW_THIESDL1_H_VERSION (includeguard)
89 
90 /* ----- END OF thiesdl1.h ----- */
aff::Series< float > Tfseries
Definition: types.h:46
idatstream Tbase
Definition: thiesdl1.h:66
thiesdl1::FileHeader Mheader
Definition: thiesdl1.h:81
class to read Thies DL1 data
Definition: thiesdl1.h:64
thiesdl1::File Mfile
Definition: thiesdl1.h:82
std::string Mmodifier
Definition: thiesdl1.h:80
aff::Series< double > Tdseries
Definition: types.h:45
const char *const streamID
Format properties.
virtual Tfseries fseries()
Store a full data file.
Definition: thiesdl1file.h:125
bool debug()
indicate debug mode
Definition: datread.h:116
const bool isbinary
Format properties.
static void help(std::ostream &os=std::cout)
virtual Tiseries iseries()
Root namespace of library.
Definition: aalibdatrwxx.cc:16
Store the header of a data file.
Definition: thiesdl1file.h:87
aff::Series< int > Tiseries
Definition: types.h:47
virtual Tdseries dseries()
static const std::ios_base::openmode openmode
Definition: thiesdl1.h:76
ithiesdl1stream(std::istream &is, const std::string &modifier="", const bool &debug=false)
virtual ~ithiesdl1stream()
Definition: thiesdl1.h:70