L1Trigger
GlobalCaloTrigger
src
L1GctHfBitCountsLut.cc
Go to the documentation of this file.
1
#include "
L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h
"
2
3
//DEFINE STATICS
4
const
int
L1GctHfBitCountsLut::NAddress
= 5;
5
const
int
L1GctHfBitCountsLut::NData
= 3;
6
7
L1GctHfBitCountsLut::L1GctHfBitCountsLut
(
const
L1GctHfEtSumsLut::hfLutType
&
type
)
8
:
L1GctLut
<NAddress,
NData
>(), m_lutType(
type
) {
9
// No setup required
10
m_setupOk
=
true
;
11
}
12
13
L1GctHfBitCountsLut::L1GctHfBitCountsLut
() :
L1GctLut
<NAddress,
NData
>(), m_lutType() {
14
// No setup required
15
m_setupOk
=
true
;
16
}
17
18
L1GctHfBitCountsLut::L1GctHfBitCountsLut
(
const
L1GctHfBitCountsLut
& lut)
19
:
L1GctLut
<NAddress,
NData
>(), m_lutType(lut.lutType()) {
20
// No setup required
21
m_setupOk
=
true
;
22
}
23
24
L1GctHfBitCountsLut::~L1GctHfBitCountsLut
() {}
25
26
uint16_t
L1GctHfBitCountsLut::value
(
const
uint16_t lutAddress)
const
{
27
// Return "address=data" up to the maximum number of output codes
28
const
int
maxOutput = ((1 <<
NData
) - 1);
29
if
(lutAddress > maxOutput)
30
return
maxOutput;
31
else
32
return
(lutAddress & maxOutput);
33
}
34
35
std::vector<unsigned>
L1GctHfBitCountsLut::getThresholdsGct
()
const
{
36
std::vector<unsigned>
result
;
37
// Return "address=data" up to the maximum number of output codes
38
for
(
unsigned
add
= 1;
add
< (1 <<
NData
);
add
++) {
39
result
.push_back(
add
);
40
}
41
return
result
;
42
}
43
44
L1GctHfBitCountsLut
L1GctHfBitCountsLut::operator=
(
const
L1GctHfBitCountsLut
& lut) {
45
const
L1GctHfBitCountsLut
&
temp
(lut);
46
return
temp
;
47
}
48
49
std::ostream&
operator<<
(std::ostream& os,
const
L1GctHfBitCountsLut
& lut) {
50
os <<
"===L1GctHfBitCountsLut==="
<< std::endl;
51
os <<
"\n===Lookup table contents===\n"
<< std::endl;
52
const
L1GctLut<L1GctHfBitCountsLut::NAddress, L1GctHfBitCountsLut::NData>
*
temp
= &lut;
53
os << *
temp
;
54
return
os;
55
}
56
57
template
class
L1GctLut<L1GctHfBitCountsLut::NAddress, L1GctHfBitCountsLut::NData>
;
L1GctHfBitCountsLut::value
uint16_t value(const uint16_t lutAddress) const override
Definition:
L1GctHfBitCountsLut.cc:26
L1GctHfEtSumsLut::hfLutType
hfLutType
Definition:
L1GctHfEtSumsLut.h:24
L1GctHfBitCountsLut::NData
static const int NData
Definition:
L1GctHfBitCountsLut.h:24
groupFilesInBlocks.temp
list temp
Definition:
groupFilesInBlocks.py:142
L1GctHfBitCountsLut::L1GctHfBitCountsLut
L1GctHfBitCountsLut()
Default constructor.
Definition:
L1GctHfBitCountsLut.cc:13
L1GctLut< 5, 3 >::m_setupOk
bool m_setupOk
Definition:
L1GctLut.h:77
hgcalConcentratorProducer_cfi.NData
NData
Definition:
hgcalConcentratorProducer_cfi.py:81
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:37
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition:
PVValidationHelpers.cc:12
L1GctHfBitCountsLut::operator=
L1GctHfBitCountsLut operator=(const L1GctHfBitCountsLut &lut)
Overload = operator.
Definition:
L1GctHfBitCountsLut.cc:44
L1GctHfBitCountsLut.h
L1GctHfBitCountsLut::NAddress
static const int NAddress
Definition:
L1GctHfBitCountsLut.h:24
L1GctLut
Base class for LookUp Tables.
Definition:
L1GctLut.h:19
L1GctHfBitCountsLut::getThresholdsGct
std::vector< unsigned > getThresholdsGct() const
Get thresholds.
Definition:
L1GctHfBitCountsLut.cc:35
mps_fire.result
result
Definition:
mps_fire.py:311
L1GctHfBitCountsLut::~L1GctHfBitCountsLut
~L1GctHfBitCountsLut() override
Destructor.
Definition:
L1GctHfBitCountsLut.cc:24
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctHfBitCountsLut &lut)
Definition:
L1GctHfBitCountsLut.cc:49
L1GctHfBitCountsLut
LUT for compression of HF feature bit counts to output format.
Definition:
L1GctHfBitCountsLut.h:19
Generated for CMSSW Reference Manual by
1.8.16