Jpp
20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
software
JAcoustics
JEventOverlap.hh
Go to the documentation of this file.
1
#ifndef __JACOUSTICS__JEVENTOVERLAP__
2
#define __JACOUSTICS__JEVENTOVERLAP__
3
4
#include "
JAcoustics/JEvent.hh
"
5
6
7
/**
8
* \author mdejong
9
*/
10
11
namespace
JACOUSTICS
{}
12
namespace
JPP
{
using namespace
JACOUSTICS
; }
13
14
namespace
JACOUSTICS
{
15
16
17
/**
18
* Match of two events considering overlap in time.
19
*/
20
class
JEventOverlap
{
21
public
:
22
/**
23
* Constructor.
24
*
25
* \param Tmax_s maximal time difference between two consecutive events [s]
26
*/
27
JEventOverlap
(
const
double
Tmax_s
) :
28
tmax_s
(
Tmax_s
)
29
{}
30
31
32
/**
33
* Match criterion.
34
*
35
* \param first first event
36
* \param second second event
37
* \return true if two events overlap in time; else false
38
*/
39
bool
operator()
(
const
JEvent
& first,
const
JEvent
& second)
const
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
}
47
48
49
/**
50
* Get time window.
51
*
52
* \return maximal time difference between two consecutive events [s]
53
*/
54
double
getTmax
()
const
55
{
56
return
tmax_s
;
57
}
58
59
60
protected
:
61
double
tmax_s
;
62
};
63
}
64
65
#endif
JEvent.hh
Acoustic event.
JACOUSTICS
Auxiliary classes and methods for acoustic position calibration.
Definition
JAbstractSoundVelocity.hh:10
JPP
Definition
JAbstractSoundVelocity.hh:11
JACOUSTICS::JEventOverlap
Match of two events considering overlap in time and position.
Definition
JAcousticsTriggerProcessor.cc:229
JACOUSTICS::JEventOverlap::operator()
bool operator()(const JEvent &first, const JEvent &second) const
Match criterion.
Definition
JEventOverlap.hh:39
JACOUSTICS::JEventOverlap::Tmax_s
const double Tmax_s
Definition
JAcousticsTriggerProcessor.cc:256
JACOUSTICS::JEventOverlap::getTmax
double getTmax() const
Get time window.
Definition
JEventOverlap.hh:54
JACOUSTICS::JEventOverlap::JEventOverlap
JEventOverlap(const double Tmax_s)
Constructor.
Definition
JEventOverlap.hh:27
JACOUSTICS::JEventOverlap::tmax_s
double tmax_s
Definition
JEventOverlap.hh:61
JACOUSTICS::JEvent
Acoustic event.
Definition
JEvent.hh:43
Generated by
1.10.0