42 const EVP_MD *md = EVP_get_digestbyname(
"SHA1");
43 if (!EVP_DigestInit_ex(mdctx, md,
nullptr))
44 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 initialization error";
46 if (!EVP_DigestUpdate(mdctx,
buf, len))
47 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 processing error";
49 unsigned char hash[EVP_MAX_MD_SIZE];
50 unsigned int md_len = 0;
51 if (!EVP_DigestFinal_ex(mdctx,
hash, &md_len))
52 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash") <<
"SHA1 finalization error";
57 char tmp[EVP_MAX_MD_SIZE * 2 + 1];
60 for (
unsigned int i = 0;
i < md_len;
i++)
74 cout <<
"AssLUTPath: " << ptr1->AssLUTPath() << endl;
79 for (
const auto &lut : ptr1->pta_lut()) {
81 cout <<
" pta_lut[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
82 int lut_[lut.size()],
i = 0;
83 for (
const pair<const short, short> &
p : lut)
84 lut_[
i++] =
p.first * 0xFFFF +
p.second;
85 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
87 cout <<
" pta_lut[" << setw(2) <<
k <<
"]= [0] " << endl;
92 cout <<
" pta_threshold= [" << ptr1->pta_threshold().size() <<
"] " << flush;
93 int pta_threshold[ptr1->pta_threshold().size()];
94 for (
unsigned int i = 0;
i < ptr1->pta_threshold().size();
i++) {
95 pta_threshold[
i] = ptr1->pta_threshold()[
i];
96 if (printPtaThreshold)
97 cout <<
" " << pta_threshold[
i] << endl;
99 if (!ptr1->pta_threshold().empty())
100 cout <<
hash(pta_threshold,
sizeof(
int) * ptr1->pta_threshold().size()) << endl;
105 for (
const auto &lut : ptr1->pta_lut()) {
107 cout <<
" phi_lut[" <<
k <<
"]= [" << lut.size() <<
"] " << flush;
108 int lut_[lut.size()],
i = 0;
109 for (
const pair<const short, short> &
p : lut)
110 lut_[
i++] =
p.first * 0xFFFF +
p.second;
111 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
113 cout <<
" phi_lut[" <<
k <<
"]= [0] " << endl;
119 for (
const auto &lu : ptr1->ext_lut()) {
120 const auto &lut = lu.low;
122 cout <<
" ext_lut_low[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
123 int lut_[lut.size()],
i = 0;
124 for (
const pair<const short, short> &
p : lut)
125 lut_[
i++] =
p.first * 0xFFFF +
p.second;
126 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
128 cout <<
" ext_lut_low[" << setw(2) <<
k <<
"]= [0] " << endl;
134 for (
const auto &lu : ptr1->ext_lut()) {
135 const auto &lut = lu.high;
137 cout <<
" ext_lut_high[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
138 int lut_[lut.size()],
i = 0;
139 for (
const pair<const short, short> &
p : lut)
140 lut_[
i++] =
p.first * 0xFFFF +
p.second;
141 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
143 cout <<
" ext_lut_high[" << setw(2) <<
k <<
"]= [0] " << endl;
149 for (
const auto &
item : ptr1->qp_lut()) {
150 cout <<
" qp_lut[" <<
item.first.first <<
"," <<
item.first.second <<
"]= " <<
item.second.first <<
", [" 151 <<
item.second.second.size() <<
"] " << flush;
152 if (!
item.second.second.empty()) {
153 int lut_[
item.second.second.size()];
154 for (
size_t i = 0;
i <
item.second.second.size();
i++)
155 lut_[
i] =
item.second.second[
i];
156 cout <<
hash(lut_,
sizeof(
int) *
item.second.second.size()) << endl;
163 for (
const pair<const short, L1MuDTEtaPattern> &
item : ptr1->eta_lut())
164 cout <<
" eta_lut[" <<
item.first <<
"]= " << endl <<
item.second << endl;
166 cout <<
"PT_Assignment_nbits_Phi= " << ptr1->get_PT_Assignment_nbits_Phi() << endl;
167 cout <<
"PT_Assignment_nbits_PhiB= " << ptr1->get_PT_Assignment_nbits_PhiB() << endl;
168 cout <<
"PHI_Assignment_nbits_Phi= " << ptr1->get_PHI_Assignment_nbits_Phi() << endl;
169 cout <<
"PHI_Assignment_nbits_PhiB= " << ptr1->get_PHI_Assignment_nbits_PhiB() << endl;
170 cout <<
"Extrapolation_nbits_Phi= " << ptr1->get_Extrapolation_nbits_Phi() << endl;
171 cout <<
"Extrapolation_nbits_PhiB= " << ptr1->get_Extrapolation_nbits_PhiB() << endl;
172 cout <<
"BX_min= " << ptr1->get_BX_min() << endl;
173 cout <<
"BX_max= " << ptr1->get_BX_max() << endl;
174 cout <<
"Extrapolation_Filter= " << ptr1->get_Extrapolation_Filter() << endl;
175 cout <<
"OutOfTime_Filter_Window= " << ptr1->get_OutOfTime_Filter_Window() << endl;
178 cout <<
"OutOfTime_Filter= " << ptr1->get_OutOfTime_Filter() << endl;
179 cout <<
"Open_LUTs= " << ptr1->get_Open_LUTs() << endl;
180 cout <<
"EtaTrackFinder= " << ptr1->get_EtaTrackFinder() << endl;
181 cout <<
"Extrapolation_21= " << ptr1->get_Extrapolation_21() << endl;
182 cout <<
"DisableNewAlgo= " << ptr1->get_DisableNewAlgo() << endl;
186 cout <<
"fwVersion= " << ptr1->fwVersion() << endl;
187 cout <<
"version= " << ptr1->version_ << endl;
#define DEFINE_FWK_MODULE(type)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::string hash(void *buf, size_t len) const
T const * product() const
~L1TMuonBarrelParamsViewer(void) override
L1TMuonBarrelParamsViewer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override