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++)
77 for (
const auto &lut : ptr1->
pta_lut()) {
79 cout <<
" pta_lut[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
80 int lut_[lut.size()],
i = 0;
81 for (
const pair<const short, short> &
p : lut)
82 lut_[
i++] =
p.first * 0xFFFF +
p.second;
83 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
85 cout <<
" pta_lut[" << setw(2) <<
k <<
"]= [0] " << endl;
94 if (printPtaThreshold)
95 cout <<
" " << pta_threshold[
i] << endl;
103 for (
const auto &lut : ptr1->
pta_lut()) {
105 cout <<
" phi_lut[" <<
k <<
"]= [" << lut.size() <<
"] " << flush;
106 int lut_[lut.size()],
i = 0;
107 for (
const pair<const short, short> &
p : lut)
108 lut_[
i++] =
p.first * 0xFFFF +
p.second;
109 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
111 cout <<
" phi_lut[" <<
k <<
"]= [0] " << endl;
117 for (
const auto &lu : ptr1->
ext_lut()) {
118 const auto &lut = lu.low;
120 cout <<
" ext_lut_low[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
121 int lut_[lut.size()],
i = 0;
122 for (
const pair<const short, short> &
p : lut)
123 lut_[
i++] =
p.first * 0xFFFF +
p.second;
124 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
126 cout <<
" ext_lut_low[" << setw(2) <<
k <<
"]= [0] " << endl;
132 for (
const auto &lu : ptr1->
ext_lut()) {
133 const auto &lut = lu.high;
135 cout <<
" ext_lut_high[" << setw(2) <<
k <<
"]= [" << lut.size() <<
"] " << flush;
136 int lut_[lut.size()],
i = 0;
137 for (
const pair<const short, short> &
p : lut)
138 lut_[
i++] =
p.first * 0xFFFF +
p.second;
139 cout <<
hash(lut_,
sizeof(
int) * lut.size()) << endl;
141 cout <<
" ext_lut_high[" << setw(2) <<
k <<
"]= [0] " << endl;
148 cout <<
" qp_lut[" <<
item.first.first <<
"," <<
item.first.second <<
"]= " <<
item.second.first <<
", [" 149 <<
item.second.second.size() <<
"] " << flush;
150 if (!
item.second.second.empty()) {
151 int lut_[
item.second.second.size()];
152 for (
size_t i = 0;
i <
item.second.second.size();
i++)
153 lut_[
i] =
item.second.second[
i];
154 cout <<
hash(lut_,
sizeof(
int) *
item.second.second.size()) << endl;
161 for (
const pair<const short, L1MuDTEtaPattern> &
item : ptr1->
eta_lut())
162 cout <<
" eta_lut[" <<
item.first <<
"]= " << endl <<
item.second << endl;
int get_Extrapolation_nbits_Phi() const
int get_Extrapolation_nbits_PhiB() const
bool get_DisableNewAlgo() const
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > token_
int get_PHI_Assignment_nbits_PhiB() const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
int get_PT_Assignment_nbits_Phi() const
int get_Extrapolation_Filter() const
int get_PT_Assignment_nbits_PhiB() const
bool get_Open_LUTs() const
bool get_OutOfTime_Filter() const
bool get_Extrapolation_21() const
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::string hash(void *buf, size_t len) const
int get_PHI_Assignment_nbits_Phi() const
#define DEFINE_FWK_MODULE(type)
std::string AssLUTPath() const
std::vector< int > pta_threshold() const
int get_OutOfTime_Filter_Window() const
std::vector< LUT > pta_lut() const
unsigned fwVersion() const
bool get_EtaTrackFinder() const
L1TMuonBarrelParamsViewer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< LUTParams::extLUT > ext_lut() const