conv/many suite: convert (m)any seismic data format(s)
completenessbins.h
Go to the documentation of this file.
1 
38 // include guard
39 #ifndef TF_COMPLETENESSBINS_H_VERSION
40 
41 #define TF_COMPLETENESSBINS_H_VERSION \
42  "TF_COMPLETENESSBINS_H V1.0 "
43 
44 #include <tfxx/error.h>
45 #include <libtime++.h>
46 
70  public:
71  CompletenessBins(const libtime::TAbsoluteTime& earliest,
72  const libtime::TAbsoluteTime& latest,
73  const libtime::TRelativeTime& binsize);
77  libtime::TAbsoluteTime earliest() const { return(Mearliest); }
78  libtime::TAbsoluteTime latest() const { return(Mlatest); }
79  libtime::TAbsoluteTime firstbin() const { return(Mfirstbin); }
80  libtime::TRelativeTime binsize() const { return(Mbinsize); }
81  unsigned int nbins() const { return(Mnbins); }
86  unsigned int samplesinbin(const libtime::TRelativeTime dt) const;
88 
90 
91  libtime::TAbsoluteTime bin(const unsigned int& i) const;
94  libtime::TAbsoluteTime endofbin(const unsigned int& i) const;
96  libtime::TAbsoluteTime nextbin(const unsigned int& i) const;
102  bool isinbin(const libtime::TAbsoluteTime& d,
103  const unsigned int& i) const;
110  unsigned int samplesinbin(const unsigned int& i,
111  const libtime::TRelativeTime dt) const;
113 
118  unsigned int bin(const libtime::TAbsoluteTime& d) const;
119  private:
120  libtime::TAbsoluteTime Mfirstbin;
121  libtime::TRelativeTime Mbinsize;
122  libtime::TAbsoluteTime Mearliest;
123  libtime::TAbsoluteTime Mlatest;
124  unsigned int Mnbins;
125 }; // class CompletenessBins
126 
127 #endif // TF_COMPLETENESSBINS_H_VERSION (includeguard)
128 
129 /* ----- END OF completenessbins.h ----- */
libtime::TAbsoluteTime firstbin() const
libtime::TAbsoluteTime Mearliest
libtime::TAbsoluteTime earliest() const
unsigned int nbins() const
libtime::TRelativeTime Mbinsize
CompletenessBins(const libtime::TAbsoluteTime &earliest, const libtime::TAbsoluteTime &latest, const libtime::TRelativeTime &binsize)
constructor
libtime::TAbsoluteTime bin(const unsigned int &i) const
beginnig of bin (according to bin raster)
libtime::TAbsoluteTime Mlatest
class to define the time axis of the completeness time series.
bool isinbin(const libtime::TAbsoluteTime &d, const unsigned int &i) const
libtime::TAbsoluteTime latest() const
libtime::TAbsoluteTime Mfirstbin
unsigned int samplesinbin(const libtime::TRelativeTime dt) const
number of samples to be expected in a bin
unsigned int Mnbins
libtime::TRelativeTime binsize() const
libtime::TAbsoluteTime endofbin(const unsigned int &i) const
end of bin (will be latest for last bin)
libtime::TAbsoluteTime nextbin(const unsigned int &i) const
start of bin (will be earliest for fisrt bin)