DATRW++ library: seismic data I/O with multiple formats
hpmodata.h
Go to the documentation of this file.
1 /*! \file hpmodata.h
2  * \brief structures and functions to hold hpmo data and to handle it (prototypes)
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 22/12/2004
8  *
9  * structures and functions to hold hpmo data and to handle it (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  * - 22/12/2004 V1.0 Thomas Forbriger
31  *
32  * ============================================================================
33  */
34 
35 // include guard
36 #ifndef DATRW_HPMODATA_H_VERSION
37 
38 #define DATRW_HPMODATA_H_VERSION \
39  "DATRW_HPMODATA_H V1.0 "
40 
41 #include<datrwxx/datread.h>
42 #include<string>
43 
44 namespace datrw {
45 
46  namespace hpmo {
47 
48  //! number of channels in HP MO data acquisition system
49  const int nchannels=20;
50  //! number of samples per minute block and channel
51  const int nsamples=12;
52  //! number of minute blocks per file (1h)
53  const int nminutes=60;
54  //! sampling interval in seconds
55  const double sampling_interval=5.;
56 
57  //! hold samples of one minute-block
58  struct SampleBlock {
60  double value(const int& ichannel, const int& isample) const
61  { return(Msamples[nchannels*(isample-1)+(ichannel-1)]); }
62  double operator() (const int& ichannel, const int& isample) const
63  { return(this->value(ichannel, isample)); }
64  }; // struct SampleBlock
65 
66  //! hold one minute block
67  struct MinuteBlock {
68  libtime::TAbsoluteTime Mtime;
71  }; // struct MinuteBlock
72 
73  } // namespace hpmo
74 
75 } // namespace datrw
76 
77 #endif // DATRW_HPMODATA_H_VERSION (includeguard)
78 
79 /* ----- END OF hpmodata.h ----- */
double operator()(const int &ichannel, const int &isample) const
Definition: hpmodata.h:62
const double sampling_interval
sampling interval in seconds
Definition: hpmodata.h:55
const int nchannels
number of channels in HP MO data acquisition system
Definition: hpmodata.h:49
double Msamples[nchannels *nsamples]
Definition: hpmodata.h:59
const int nsamples
number of samples per minute block and channel
Definition: hpmodata.h:51
hold one minute block
Definition: hpmodata.h:67
Root namespace of library.
Definition: aalibdatrwxx.cc:16
double value(const int &ichannel, const int &isample) const
Definition: hpmodata.h:60
libtime::TAbsoluteTime Mtime
Definition: hpmodata.h:68
hold samples of one minute-block
Definition: hpmodata.h:58
const int nminutes
number of minute blocks per file (1h)
Definition: hpmodata.h:53