34 #include <openssl/sha.h>
40 char tmp[SHA_DIGEST_LENGTH * 2 + 1];
41 bzero(tmp,
sizeof(tmp));
44 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 initialization error";
46 if (!SHA1_Update(&ctx, buf, len))
47 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 processing error";
49 unsigned char hash[SHA_DIGEST_LENGTH];
50 if (!SHA1_Final(hash, &ctx))
51 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 finalization error";
54 for (
unsigned int i = 0;
i < 20;
i++)
55 ::sprintf(&tmp[
i * 2],
"%02x", hash[i]);
68 cout <<
"AssLUTPath: " << ptr1->AssLUTPath() << endl;
73 for (
const auto &lut : ptr1->pta_lut()) {
75 cout <<
" pta_lut[" << setw(2) << k <<
"]= [" << lut.size() <<
"] " << flush;
76 int lut_[lut.size()],
i = 0;
77 for (
const pair<const short, short> &
p : lut)
78 lut_[i++] =
p.first * 0xFFFF +
p.second;
79 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
81 cout <<
" pta_lut[" << setw(2) << k <<
"]= [0] " << endl;
86 cout <<
" pta_threshold= [" << ptr1->pta_threshold().size() <<
"] " << flush;
87 int pta_threshold[ptr1->pta_threshold().size()];
88 for (
unsigned int i = 0;
i < ptr1->pta_threshold().size();
i++) {
89 pta_threshold[
i] = ptr1->pta_threshold()[
i];
90 if (printPtaThreshold)
91 cout <<
" " << pta_threshold[
i] << endl;
93 if (!ptr1->pta_threshold().empty())
94 cout <<
hash(pta_threshold,
sizeof(
int) * ptr1->pta_threshold().size()) << endl;
99 for (
const auto &lut : ptr1->pta_lut()) {
101 cout <<
" phi_lut[" << k <<
"]= [" << lut.size() <<
"] " << flush;
102 int lut_[lut.size()],
i = 0;
103 for (
const pair<const short, short> &
p : lut)
104 lut_[i++] =
p.first * 0xFFFF +
p.second;
105 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
107 cout <<
" phi_lut[" << k <<
"]= [0] " << endl;
113 for (
const auto &lu : ptr1->ext_lut()) {
114 const auto &lut = lu.low;
116 cout <<
" ext_lut_low[" << setw(2) << k <<
"]= [" << lut.size() <<
"] " << flush;
117 int lut_[lut.size()],
i = 0;
118 for (
const pair<const short, short> &
p : lut)
119 lut_[i++] =
p.first * 0xFFFF +
p.second;
120 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
122 cout <<
" ext_lut_low[" << setw(2) << k <<
"]= [0] " << endl;
128 for (
const auto &lu : ptr1->ext_lut()) {
129 const auto &lut = lu.high;
131 cout <<
" ext_lut_high[" << setw(2) << k <<
"]= [" << lut.size() <<
"] " << flush;
132 int lut_[lut.size()],
i = 0;
133 for (
const pair<const short, short> &
p : lut)
134 lut_[i++] =
p.first * 0xFFFF +
p.second;
135 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
137 cout <<
" ext_lut_high[" << setw(2) << k <<
"]= [0] " << endl;
143 for (
const auto &
item : ptr1->qp_lut()) {
144 cout <<
" qp_lut[" <<
item.first.first <<
"," <<
item.first.second <<
"]= " <<
item.second.first <<
", ["
145 <<
item.second.second.size() <<
"] " << flush;
146 if (!
item.second.second.empty()) {
147 int lut_[
item.second.second.size()];
148 for (
size_t i = 0;
i <
item.second.second.size();
i++)
149 lut_[
i] =
item.second.second[
i];
150 cout <<
hash(lut_,
sizeof(
int) *
item.second.second.size()) << endl;
157 for (
const pair<const short, L1MuDTEtaPattern> &
item : ptr1->eta_lut())
158 cout <<
" eta_lut[" <<
item.first <<
"]= " << endl <<
item.second << endl;
160 cout <<
"PT_Assignment_nbits_Phi= " << ptr1->get_PT_Assignment_nbits_Phi() << endl;
161 cout <<
"PT_Assignment_nbits_PhiB= " << ptr1->get_PT_Assignment_nbits_PhiB() << endl;
162 cout <<
"PHI_Assignment_nbits_Phi= " << ptr1->get_PHI_Assignment_nbits_Phi() << endl;
163 cout <<
"PHI_Assignment_nbits_PhiB= " << ptr1->get_PHI_Assignment_nbits_PhiB() << endl;
164 cout <<
"Extrapolation_nbits_Phi= " << ptr1->get_Extrapolation_nbits_Phi() << endl;
165 cout <<
"Extrapolation_nbits_PhiB= " << ptr1->get_Extrapolation_nbits_PhiB() << endl;
166 cout <<
"BX_min= " << ptr1->get_BX_min() << endl;
167 cout <<
"BX_max= " << ptr1->get_BX_max() << endl;
168 cout <<
"Extrapolation_Filter= " << ptr1->get_Extrapolation_Filter() << endl;
169 cout <<
"OutOfTime_Filter_Window= " << ptr1->get_OutOfTime_Filter_Window() << endl;
172 cout <<
"OutOfTime_Filter= " << ptr1->get_OutOfTime_Filter() << endl;
173 cout <<
"Open_LUTs= " << ptr1->get_Open_LUTs() << endl;
174 cout <<
"EtaTrackFinder= " << ptr1->get_EtaTrackFinder() << endl;
175 cout <<
"Extrapolation_21= " << ptr1->get_Extrapolation_21() << endl;
176 cout <<
"DisableNewAlgo= " << ptr1->get_DisableNewAlgo() << endl;
180 cout <<
"fwVersion= " << ptr1->fwVersion() << endl;
181 cout <<
"version= " << ptr1->version_ << endl;
#define DEFINE_FWK_MODULE(type)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
T const * product() const
~L1TMuonBarrelParamsViewer(void) override
L1TMuonBarrelParamsViewer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::string hash(void *buf, size_t len) const