src
HLTrigger
HLTcore
src
TriggerExpressionPrescaler.cc
Go to the documentation of this file.
1
#include "
HLTrigger/HLTcore/interface/TriggerExpressionPrescaler.h
"
2
#include "
HLTrigger/HLTcore/interface/TriggerExpressionData.h
"
3
4
namespace
triggerExpression
{
5
6
bool
Prescaler::operator()
(
const
Data
&
data
)
const
{
7
// if the prescale factor is 0, we never need to run any dependent module,
8
// so we can safely skip the rest of the processing
9
if
(
m_prescale
== 0)
10
return
false
;
11
12
bool
result
= ((*m_arg)(
data
));
13
if
(not
result
)
14
return
false
;
15
16
// if the prescale factor is 1, we do not need to keep track of the event counter
17
if
(
m_prescale
== 1)
18
return
true
;
19
20
return
(++
m_counter
%
m_prescale
) == 0;
21
}
22
23
void
Prescaler::init
(
const
Data
&
data
) {
24
// initialize the depending modules
25
UnaryOperator::init
(
data
);
26
27
// initialize the counter to the first event number seen,
28
// in order to avoid all prescalers on different FUs to be synchronous
29
m_counter
=
data
.eventNumber();
30
}
31
32
}
// namespace triggerExpression
mps_fire.result
result
Definition:
mps_fire.py:311
triggerExpression::Prescaler::m_prescale
unsigned int m_prescale
Definition:
TriggerExpressionPrescaler.h:23
triggerExpression::UnaryOperator::init
void init(const Data &data) override
Definition:
TriggerExpressionOperators.h:16
TriggerExpressionData.h
TriggerExpressionPrescaler.h
triggerExpression::Prescaler::operator()
bool operator()(const Data &data) const override
Definition:
TriggerExpressionPrescaler.cc:6
triggerExpression::Data
Definition:
TriggerExpressionData.h:23
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
triggerExpression::Prescaler::m_counter
unsigned int m_counter
Definition:
TriggerExpressionPrescaler.h:24
triggerExpression::Prescaler::init
void init(const Data &data) override
Definition:
TriggerExpressionPrescaler.cc:23
triggerExpression
Definition:
TriggerExpressionConstant.h:6
Generated for CMSSW Reference Manual by
1.8.14