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