DataFormats
PatCandidates
src
TriggerCondition.cc
Go to the documentation of this file.
1
//
2
//
3
4
#include "
DataFormats/PatCandidates/interface/TriggerCondition.h
"
5
6
using namespace
pat
;
7
8
// Constructors and Destructor
9
10
// Default constructor
11
TriggerCondition::TriggerCondition
() : name_(), accept_(), category_(), type_() {
12
triggerObjectTypes_
.clear();
13
objectKeys_
.clear();
14
}
15
16
// Constructor from condition name "only"
17
TriggerCondition::TriggerCondition
(
const
std::string
&
name
) : name_(
name
), accept_(), category_(), type_() {
18
triggerObjectTypes_
.clear();
19
objectKeys_
.clear();
20
}
21
22
// Constructor from values
23
TriggerCondition::TriggerCondition
(
const
std::string
&
name
,
bool
accept
)
24
: name_(
name
), accept_(
accept
), category_(), type_() {
25
triggerObjectTypes_
.clear();
26
objectKeys_
.clear();
27
}
28
29
// Methods
30
31
// Get the trigger object types
32
std::vector<int>
TriggerCondition::triggerObjectTypes
()
const
{
33
std::vector<int>
triggerObjectTypes
;
34
for
(
size_t
iT = 0; iT <
triggerObjectTypes_
.size(); ++iT) {
35
triggerObjectTypes
.push_back(
int
(
triggerObjectTypes_
.at(iT)));
36
}
37
return
triggerObjectTypes
;
38
}
39
40
// Checks, if a certain trigger object type is assigned
41
bool
TriggerCondition::hasTriggerObjectType
(
trigger::TriggerObjectType
triggerObjectType)
const
{
42
for
(
size_t
iT = 0; iT <
triggerObjectTypes_
.size(); ++iT) {
43
if
(
triggerObjectTypes_
.at(iT) == triggerObjectType)
44
return
true
;
45
}
46
return
false
;
47
}
48
49
// Checks, if a certain trigger object collection index is assigned
50
bool
TriggerCondition::hasObjectKey
(
unsigned
objectKey)
const
{
51
for
(
size_t
iO = 0; iO <
objectKeys_
.size(); ++iO) {
52
if
(
objectKeys_
.at(iO) == objectKey)
53
return
true
;
54
}
55
return
false
;
56
}
trigger::TriggerObjectType
TriggerObjectType
Definition:
TriggerTypeDefs.h:23
pat::TriggerCondition::hasObjectKey
bool hasObjectKey(unsigned objectKey) const
Checks, if a certain trigger object collection index is assigned.
Definition:
TriggerCondition.cc:50
pat::TriggerCondition::objectKeys_
std::vector< unsigned > objectKeys_
Definition:
TriggerCondition.h:51
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition:
TopDQMHelpers.h:30
pat::TriggerCondition::hasTriggerObjectType
bool hasTriggerObjectType(trigger::TriggerObjectType triggerObjectType) const
Checks, if a certain trigger object type is assigned.
Definition:
TriggerCondition.cc:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
pat
Definition:
HeavyIon.h:7
pat::TriggerCondition::triggerObjectTypes_
std::vector< trigger::TriggerObjectType > triggerObjectTypes_
Definition:
TriggerCondition.h:48
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
pat::TriggerCondition::triggerObjectTypes
std::vector< int > triggerObjectTypes() const
Get the trigger object types.
Definition:
TriggerCondition.cc:32
pat::TriggerCondition::TriggerCondition
TriggerCondition()
Constructors and Desctructor.
Definition:
TriggerCondition.cc:11
TriggerCondition.h
Generated for CMSSW Reference Manual by
1.8.16