Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JAcoustics/JTriggerOutput.hh
Go to the documentation of this file.
1#ifndef __JACOUSTICS__JTRIGGEROUTPUT__
2#define __JACOUSTICS__JTRIGGEROUTPUT__
3
4#include <vector>
5
7
8
9/**
10 * \author mdejong
11 */
12
13namespace JACOUSTICS {}
14namespace JPP { using namespace JACOUSTICS; }
15
16namespace JACOUSTICS {
17
18
19 /**
20 * Set of acoustics events.
21 */
23 public std::vector<JEvent>
24 {
25 public:
26 /**
27 * Default constructor.
28 */
30 std::vector<JEvent>()
31 {}
32
33
34 /**
35 * Merge events.
36 *
37 * \param match match criterion
38 */
39 template<class JMatch_t>
40 inline void merge(const JMatch_t& match)
41 {
42 std::sort(this->begin(), this->end());
43
44 iterator out = this->begin();
45
46 for (iterator i = this->begin(); i != this->end(); ++out) {
47
48 if (out != i) {
49 *out = *i; // copy event
50 }
51
52 while (++i != this->end() && match(*out,*i)) {
53 out->merge(*i); // merge event
54 }
55 }
56
57 this->erase(out, this->end());
58 }
59 };
60}
61
62#endif
Acoustic event.
void merge(const JMatch_t &match)
Merge events.
Auxiliary classes and methods for acoustic position calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).