conv/many suite: convert (m)any seismic data format(s)

◆ CompletenessBins()

CompletenessBins::CompletenessBins ( const libtime::TAbsoluteTime &  earliest,
const libtime::TAbsoluteTime &  latest,
const libtime::TRelativeTime &  binsize 
)

constructor

Definition at line 44 of file completenessbins.cc.

References binsize(), earliest(), latest(), Mbinsize, Mearliest, Mfirstbin, Mlatest, and Mnbins.

47 {
50  this->Mbinsize=binsize;
51 
52  // initialize beginning of first bin
53  // align to midnight
54  this->Mfirstbin=libtime::TAbsoluteTime(earliest.year(),
55  earliest.month(),
56  earliest.day());
57  // find appropriate first bin
58  while (Mfirstbin < earliest)
59  {
60  Mfirstbin += binsize;
61  }
62 
63  // find number of bins required to span the entire interval
64  Mnbins=1;
65  libtime::TAbsoluteTime current=Mfirstbin+binsize;
66  while (current <= latest)
67  {
68  Mnbins++;
69  current += binsize;
70  }
71 } // CompletenessBins::CompletenessBins
libtime::TAbsoluteTime Mearliest
libtime::TAbsoluteTime earliest() const
libtime::TRelativeTime Mbinsize
libtime::TAbsoluteTime Mlatest
libtime::TAbsoluteTime latest() const
libtime::TAbsoluteTime Mfirstbin
unsigned int Mnbins
libtime::TRelativeTime binsize() const
Here is the call graph for this function: