L1Trigger
TrackFindingTracklet
src
TETableBase.cc
Go to the documentation of this file.
1
#include "
L1Trigger/TrackFindingTracklet/interface/TETableBase.h
"
2
3
using namespace
std
;
4
using namespace
trklet
;
5
6
TETableBase::TETableBase(
Settings
const
& settings) : settings_(settings) {}
7
8
void
TETableBase::writeVMTable
(
std::string
name
,
bool
positive) {
9
// Write LUT table.
10
11
ofstream
out
(
name
);
12
if
(
out
.fail())
13
throw
cms::Exception
(
"BadFile"
) << __FILE__ <<
" "
<< __LINE__ <<
" could not create file "
<<
name
;
14
15
out
<<
"{"
<< endl;
16
for
(
unsigned
int
i
= 0;
i
<
table_
.size();
i
++) {
17
if
(
i
!= 0) {
18
out
<<
","
<< endl;
19
}
20
21
assert
(
nbits_
> 0);
22
23
int
itable =
table_
[
i
];
24
if
(positive) {
25
if
(
table_
[
i
] < 0) {
26
itable = (1 <<
nbits_
) - 1;
27
}
28
}
29
30
out
<< itable;
31
}
32
out
<< endl <<
"};"
<< endl;
33
out
.close();
34
}
mps_fire.i
i
Definition:
mps_fire.py:428
trklet::Settings
Definition:
Settings.h:31
cms::cuda::assert
assert(be >=bs)
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::TETableBase::writeVMTable
void writeVMTable(std::string name, bool positive=true)
Definition:
TETableBase.cc:8
TETableBase.h
trklet::TETableBase::table_
std::vector< int > table_
Definition:
TETableBase.h:28
trklet
Definition:
AllProjectionsMemory.h:9
std
Definition:
JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
cms::Exception
Definition:
Exception.h:70
trklet::TETableBase::nbits_
int nbits_
Definition:
TETableBase.h:29
Generated for CMSSW Reference Manual by
1.8.16