31 printPtaThreshold =
false;
37 #include <openssl/sha.h> 43 char tmp[SHA_DIGEST_LENGTH*2+1];
44 bzero(tmp,
sizeof(tmp));
46 if( !SHA1_Init( &ctx ) )
47 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash")<<
"SHA1 initialization error";
49 if( !SHA1_Update( &ctx, buf, len ) )
50 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash")<<
"SHA1 processing error";
52 unsigned char hash[SHA_DIGEST_LENGTH];
53 if( !SHA1_Final(hash, &ctx) )
54 throw cms::Exception(
"L1TMuonBarrelParamsViewer::hash")<<
"SHA1 finalization error";
57 for(
unsigned int i=0;
i<20;
i++)
58 ::sprintf(&tmp[
i*2],
"%02x", hash[i]);
73 cout <<
"AssLUTPath: " << ptr1->AssLUTPath() << endl;
77 for(
size_t l=0;
l<ptr1->pta_lut().size();
l++){
78 const LUT &
lut = ptr1->pta_lut()[
l];
80 cout<<
" pta_lut[" << setw(2) <<
l <<
"]= ["<<lut.size()<<
"] "<<flush;
81 int lut_[lut.size()],
i=0;
82 for(
const pair<short,short> &
p : lut) lut_[i++] =
p.first*0xFFFF +
p.second;
83 cout <<
hash( lut_,
sizeof(
int)*lut.size() ) << endl;
85 cout<<
" pta_lut[" << setw(2) <<
l <<
"]= [0] "<<endl;
89 cout <<
" pta_threshold= [" << ptr1->pta_threshold().size() <<
"] "<<flush;
90 int pta_threshold[ptr1->pta_threshold().size()];
91 for(
unsigned int i=0;
i<ptr1->pta_threshold().size();
i++){
92 pta_threshold[
i] = ptr1->pta_threshold()[
i];
93 if( printPtaThreshold )
cout<<
" "<<pta_threshold[
i]<<endl;
95 if( !ptr1->pta_threshold().empty() )
96 cout <<
hash(pta_threshold,
sizeof(
int)*ptr1->pta_threshold().size()) << endl;
99 for(
size_t l=0;
l<ptr1->phi_lut().size();
l++){
100 const LUT &
lut = ptr1->phi_lut()[
l];
102 cout<<
" phi_lut[" <<
l <<
"]= ["<<lut.size()<<
"] "<<flush;
103 int lut_[lut.size()],
i=0;
104 for(
const pair<short,short> &
p : lut) lut_[i++] =
p.first*0xFFFF +
p.second;
105 cout <<
hash( lut_,
sizeof(
int)*lut.size() ) << endl;
107 cout<<
" phi_lut[" <<
l <<
"]= [0] "<<endl;
111 for(
size_t l=0;
l<ptr1->ext_lut().size();
l++){
112 const LUT &
lut = (ptr1->ext_lut()[
l]).low;
114 cout<<
" ext_lut_low[" << setw(2) <<
l <<
"]= ["<<lut.size()<<
"] "<<flush;
115 int lut_[lut.size()],
i=0;
116 for(
const pair<short,short> &
p : lut) lut_[i++] =
p.first*0xFFFF +
p.second;
117 cout <<
hash( lut_,
sizeof(
int)*lut.size() ) << endl;
119 cout<<
" ext_lut_low[" << setw(2) <<
l <<
"]= [0] "<<endl;
123 for(
size_t l=0;
l<ptr1->ext_lut().size();
l++){
124 const LUT &
lut = (ptr1->ext_lut()[
l]).high;
126 cout<<
" ext_lut_high[" << setw(2) <<
l <<
"]= ["<<lut.size()<<
"] "<<flush;
127 int lut_[lut.size()],
i=0;
128 for(
const pair<short,short> &
p : lut) lut_[i++] =
p.first*0xFFFF +
p.second;
129 cout <<
hash( lut_,
sizeof(
int)*lut.size() ) << endl;
131 cout<<
" ext_lut_high[" << setw(2) <<
l <<
"]= [0] "<<endl;
136 for(
const pair< pair<short,short>, pair<
short, vector<short>> > item : ptr1->qp_lut() ){
137 cout <<
" qp_lut[" << item.first.first <<
"," << item.first.second <<
"]= " 138 << item.second.first <<
", [" << item.second.second.size() <<
"] " << flush;
139 if( !item.second.second.empty() ){
140 int lut_[item.second.second.size()];
141 for(
size_t i=0;
i<item.second.second.size();
i++) lut_[
i] = item.second.second[
i];
142 cout <<
hash( lut_,
sizeof(
int)*item.second.second.size() ) << endl;
149 for(
const pair<short, L1MuDTEtaPattern> &item : ptr1->eta_lut())
150 cout <<
" eta_lut[" << item.first <<
"]= " << endl << item.second << endl;
152 cout <<
"PT_Assignment_nbits_Phi= " << ptr1->get_PT_Assignment_nbits_Phi() << endl;
153 cout <<
"PT_Assignment_nbits_PhiB= " << ptr1->get_PT_Assignment_nbits_PhiB() << endl;
154 cout <<
"PHI_Assignment_nbits_Phi= " << ptr1->get_PHI_Assignment_nbits_Phi() << endl;
155 cout <<
"PHI_Assignment_nbits_PhiB= " << ptr1->get_PHI_Assignment_nbits_PhiB() << endl;
156 cout <<
"Extrapolation_nbits_Phi= " << ptr1->get_Extrapolation_nbits_Phi() << endl;
157 cout <<
"Extrapolation_nbits_PhiB= " << ptr1->get_Extrapolation_nbits_PhiB() << endl;
158 cout <<
"BX_min= " << ptr1->get_BX_min() << endl;
159 cout <<
"BX_max= " << ptr1->get_BX_max() << endl;
160 cout <<
"Extrapolation_Filter= " << ptr1->get_Extrapolation_Filter() << endl;
161 cout <<
"OutOfTime_Filter_Window= " << ptr1->get_OutOfTime_Filter_Window() << endl;
164 cout <<
"OutOfTime_Filter= " << ptr1->get_OutOfTime_Filter() << endl;
165 cout <<
"Open_LUTs= " << ptr1->get_Open_LUTs() << endl;
166 cout <<
"EtaTrackFinder= " << ptr1->get_EtaTrackFinder() << endl;
167 cout <<
"Extrapolation_21= " << ptr1->get_Extrapolation_21() << endl;
168 cout <<
"DisableNewAlgo= " << ptr1->get_DisableNewAlgo() << endl;
172 cout <<
"fwVersion= " << ptr1->fwVersion() << endl;
173 cout <<
"version= " << ptr1->version_ << endl;
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
~L1TMuonBarrelParamsViewer(void) override
std::vector< std::vector< double > > tmp
L1TMuonBarrelParamsViewer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::string hash(void *buf, size_t len) const
std::vector< unsigned short int > LUT
T const * product() const