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

◆ bin() [2/2]

unsigned int CompletenessBins::bin ( const libtime::TAbsoluteTime &  d) const

find appropriate bin

Parameters
ddate and time to find appropriate bin for
Returns
bin number into which falls

Definition at line 105 of file completenessbins.cc.

References earliest(), isinbin(), latest(), and Mnbins.

106 {
107  TFXX_assert((d >= this->earliest()) && (d <= this->latest()),
108  "date is out of range");
109  unsigned int retval=0;
110  while ((retval<Mnbins) && !this->isinbin(d, retval)) { ++retval; }
111  return(retval);
112 } // unsigned int CompletenessBins::bin(const libtime::TAbsoluteTime& d) const
libtime::TAbsoluteTime earliest() const
bool isinbin(const libtime::TAbsoluteTime &d, const unsigned int &i) const
libtime::TAbsoluteTime latest() const
unsigned int Mnbins
Here is the call graph for this function: