Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JACOUSTICS::JEventOverlap Class Reference

Match of two events considering overlap in time. More...

#include <JEventOverlap.hh>

Public Member Functions

 JEventOverlap (const double Tmax_s)
 Constructor. More...
 
bool operator() (const JEvent &first, const JEvent &second) const
 Match criterion. More...
 
double getTmax () const
 Get time window. More...
 

Protected Attributes

double tmax_s
 

Detailed Description

Match of two events considering overlap in time.

Definition at line 20 of file JAcoustics/JEventOverlap.hh.

Constructor & Destructor Documentation

JACOUSTICS::JEventOverlap::JEventOverlap ( const double  Tmax_s)
inline

Constructor.

Parameters
Tmax_smaximal time difference between two consecutive events [s]

Definition at line 27 of file JAcoustics/JEventOverlap.hh.

27  :
28  tmax_s(Tmax_s)
29  {}

Member Function Documentation

bool JACOUSTICS::JEventOverlap::operator() ( const JEvent first,
const JEvent second 
) const
inline

Match criterion.

Parameters
firstfirst event
secondsecond event
Returns
true if two events overlap in time; else false

Definition at line 39 of file JAcoustics/JEventOverlap.hh.

40  {
41  if (first .empty()) return false;
42  if (second.empty()) return false;
43 
44  return (first.rbegin()->getToE() >= second. begin()->getToE() - tmax_s &&
45  first. begin()->getToE() <= second.rbegin()->getToE() + tmax_s);
46  }
double JACOUSTICS::JEventOverlap::getTmax ( ) const
inline

Get time window.

Returns
maximal time difference between two consecutive events [s]

Definition at line 54 of file JAcoustics/JEventOverlap.hh.

55  {
56  return tmax_s;
57  }

Member Data Documentation

double JACOUSTICS::JEventOverlap::tmax_s
protected

Definition at line 61 of file JAcoustics/JEventOverlap.hh.


The documentation for this class was generated from the following file: