Jpp
18.6.0-rc.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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
JTRIGGER::JTriggerOutput
Set of triggered events.
Definition:
JTrigger/JTriggerOutput.hh:23
std::vector
Definition:
JSTDTypes.hh:13
i
then rm i
Definition:
JEvtReweightMupageParameterScan.sh:309
std::iterator
Definition:
JSTDTypes.hh:19
JTRIGGER::JTriggerOutput::JTriggerOutput
JTriggerOutput()
Default constructor.
Definition:
JTrigger/JTriggerOutput.hh:30
JEvent.hh
JTRIGGER::JTriggerOutput::merge
void merge(const JMatch_t &match)
Merge events.
Definition:
JTrigger/JTriggerOutput.hh:41
JTRIGGER::JEvent
Triggered event.
Definition:
JTrigger/JEvent.hh:32
Generated by
1.8.5