DATRW++ library: seismic data I/O with multiple formats
hpmo.h
Go to the documentation of this file.
1 /*! \file hpmo.h
2  * \brief provide data from HP Mo (BFO data acquisition system) (prototypes)
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 31/03/2004
8  *
9  * provide data from HP Mo (BFO data acquisition system) (prototypes)
10  *
11  * ----
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25  * ----
26  *
27  * Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
28  *
29  * REVISIONS and CHANGES
30  * - 31/03/2004 V1.0 Thomas Forbriger
31  * - 23/11/2010 V1.1 introduced static members
32  *
33  * ============================================================================
34  */
35 
36 // include guard
37 #ifndef DATRW_HPMO_H_VERSION
38 
39 #define DATRW_HPMO_H_VERSION \
40  "DATRW_HPMO_H V1.1"
41 
42 #include<datrwxx/datread.h>
43 #include<datrwxx/hpmodata.h>
44 #include<libtime++.h>
45 
46 namespace datrw {
47 
48  namespace hpmo {
49 
50  extern const bool isbinary;
51  extern const char* const streamID;
52 
53  } // namespace hpmo
54 
55  /*----------------------------------------------------------------------*/
56 
57  /*! \brief class to read HPMO data
58  *
59  * \ingroup group_hpmo
60  */
61  class ihpmostream: public idatstream {
62  public:
63  typedef idatstream Tbase;
64  ihpmostream(std::istream& is, const bool& verbose=false);
65  virtual ~ihpmostream() { }
66  virtual Tdseries dseries();
67  virtual Tfseries fseries();
68  //virtual Tiseries iseries();
69  virtual void skipseries();
70  static void help(std::ostream& os=std::cout)
71  { Tbase::help(os, "ihpmostream"); }
72  static const std::ios_base::openmode openmode;
73  private:
74  //! read one data file
75  void read(std::istream& is, const bool& verbose=false);
76  //! set header for next request
77  void set_next_header();
78  //! buffer to hold one data file
80  int Mindex[datrw::hpmo::nminutes]; //<! index to contiguous blocks
81  int Mnblocks; //<! number of contiguous blocks
82  int Mnextblock; //<! next block to extract
83  int Mnextchannel; //<! next channel to extract
84  }; // class ihpmostream
85 
86 } // namespace datrw
87 
88 #endif // DATRW_HPMO_H_VERSION (includeguard)
89 
90 /* ----- END OF hpmo.h ----- */
virtual Tdseries dseries()
Definition: ihpmostream.cc:67
class to read HPMO data
Definition: hpmo.h:61
aff::Series< float > Tfseries
Definition: types.h:46
static void help(std::ostream &os=std::cout, const char *name="idatsream")
print some info about data conversion.
Definition: datread.cc:153
aff::Series< double > Tdseries
Definition: types.h:45
static const std::ios_base::openmode openmode
Definition: hpmo.h:72
const bool isbinary
Format properties.
Definition: ihpmostream.cc:54
void read(std::istream &is, const bool &verbose=false)
read one data file
Definition: ihpmostream.cc:101
virtual ~ihpmostream()
Definition: hpmo.h:65
hold one minute block
Definition: hpmodata.h:67
datrw::hpmo::MinuteBlock Mdatafile[datrw::hpmo::nminutes]
buffer to hold one data file
Definition: hpmo.h:79
idatstream Tbase
Definition: hpmo.h:63
Root namespace of library.
Definition: aalibdatrwxx.cc:16
void set_next_header()
set header for next request
Definition: ihpmostream.cc:172
int Mnextchannel
Definition: hpmo.h:83
const char *const streamID
Format properties.
Definition: ihpmostream.cc:55
virtual void skipseries()
Definition: ihpmostream.cc:94
virtual Tfseries fseries()
Definition: ihpmostream.cc:89
int Mindex[datrw::hpmo::nminutes]
Definition: hpmo.h:80
ihpmostream(std::istream &is, const bool &verbose=false)
Definition: ihpmostream.cc:60
static void help(std::ostream &os=std::cout)
Definition: hpmo.h:70
int Mnextblock
Definition: hpmo.h:82
const int nminutes
number of minute blocks per file (1h)
Definition: hpmodata.h:53