27 string hash(
void *
buf,
size_t len)
const;
30 printLayerMap =
pset.getUntrackedParameter<
bool>(
"printLayerMap",
false);
35 #include <openssl/sha.h>
41 char tmp[SHA_DIGEST_LENGTH * 2 + 1];
45 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 initialization error";
47 if (!SHA1_Update(&ctx,
buf, len))
48 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 processing error";
50 unsigned char hash[SHA_DIGEST_LENGTH];
51 if (!SHA1_Final(
hash, &ctx))
52 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 finalization error";
55 for (
unsigned int i = 0;
i < 20;
i++)
68 cout <<
"Some fields in L1TMuonOverlapParamsParams: " << endl;
70 cout <<
" fwVersion() = " << ptr1->fwVersion() << endl;
71 cout <<
" nPdfAddrBits() = " << ptr1->nPdfAddrBits() << endl;
72 cout <<
" nPdfValBits() = " << ptr1->nPdfValBits() << endl;
73 cout <<
" nHitsPerLayer() = " << ptr1->nHitsPerLayer() << endl;
74 cout <<
" nPhiBits() = " << ptr1->nPhiBits() << endl;
75 cout <<
" nPhiBins() = " << ptr1->nPhiBins() << endl;
76 cout <<
" nRefHits() = " << ptr1->nRefHits() << endl;
77 cout <<
" nTestRefHits() = " << ptr1->nTestRefHits() << endl;
78 cout <<
" nProcessors() = " << ptr1->nProcessors() << endl;
79 cout <<
" nLogicRegions() = " << ptr1->nLogicRegions() << endl;
80 cout <<
" nInputs() = " << ptr1->nInputs() << endl;
81 cout <<
" nLayers() = " << ptr1->nLayers() << endl;
82 cout <<
" nRefLayers() = " << ptr1->nRefLayers() << endl;
83 cout <<
" nGoldenPatterns() = " << ptr1->nGoldenPatterns() << endl;
85 const std::vector<int> *
gp = ptr1->generalParams();
86 cout <<
" number of general parameters: = " <<
gp->size() << endl;
92 const std::vector<L1TMuonOverlapParams::LayerMapNode> *lm = ptr1->layerMap();
94 cout <<
" layerMap() = [" << lm->size() <<
"] ";
96 for (
unsigned int i = 0;
i < lm->size();
i++)
101 for (
unsigned int i = 0;
i < lm->size();
i++) {
105 char *
n = (
char *)(&(lm_[
i]));
107 cout <<
"0x" << hex <<
int(*(
n +
j)) <<
dec <<
", ";
114 cout <<
" layerMap() = [0] " << endl;
117 const std::vector<L1TMuonOverlapParams::RefLayerMapNode> *rlm = ptr1->refLayerMap();
119 cout <<
" refLayerMap() = [" << rlm->size() <<
"] ";
121 for (
unsigned int i = 0;
i < rlm->size();
i++)
126 cout <<
" refLayerMap() = [0] " << endl;
129 const std::vector<L1TMuonOverlapParams::RefHitNode> *rhn = ptr1->refHitMap();
131 cout <<
" refHitMap() = [" << rhn->size() <<
"] ";
133 for (
unsigned int i = 0;
i < rhn->size();
i++)
138 cout <<
" refHitMap() = [0] " << endl;
141 const std::vector<int> *gpsm = ptr1->globalPhiStartMap();
142 if (!gpsm->empty()) {
143 cout <<
" globalPhiStartMap() = [" << gpsm->size() <<
"] ";
144 int gpsm_[gpsm->size()];
145 for (
unsigned int i = 0;
i < gpsm->size();
i++)
146 gpsm_[
i] = (*gpsm)[
i];
147 cout <<
hash(gpsm_,
sizeof(
int) * (gpsm->size())) << endl;
149 cout <<
" globalPhiStartMap() = [0] " << endl;
152 const std::vector<L1TMuonOverlapParams::LayerInputNode> *lim = ptr1->layerInputMap();
154 cout <<
" layerInputMap() = [" << lim->size() <<
"] ";
156 for (
unsigned int i = 0;
i < lim->size();
i++)
161 cout <<
" layerInputMap() = [0] " << endl;
164 const std::vector<int> *css = ptr1->connectedSectorsStart();
166 cout <<
" connectedSectorsStart() = [" << css->size() <<
"] ";
167 int css_[css->size()];
168 for (
unsigned int i = 0;
i < css->size();
i++)
170 cout <<
hash(css_,
sizeof(
int) * (css->size())) << endl;
172 cout <<
" connectedSectorsStart() = [0] " << endl;
175 const std::vector<int> *cse = ptr1->connectedSectorsEnd();
177 cout <<
" connectedSectorsEnd() = [" << cse->size() <<
"] ";
178 int cse_[cse->size()];
179 for (
unsigned int i = 0;
i < cse->size();
i++)
181 cout <<
hash(cse_,
sizeof(
int) * (cse->size())) << endl;
183 cout <<
" connectedSectorsEnd() = [0] " << endl;
186 const l1t::LUT *clut = ptr1->chargeLUT();
188 cout <<
" chargeLUT = [" << clut->
maxSize() <<
"] ";
190 for (
unsigned int i = 0;
i < clut->
maxSize();
i++)
194 cout <<
" chargeLUT = [0] " << endl;
197 const l1t::LUT *elut = ptr1->etaLUT();
201 for (
unsigned int i = 0;
i < elut->
maxSize();
i++)
205 cout <<
" chargeLUT = [0] " << endl;
208 const l1t::LUT *ptlut = ptr1->ptLUT();
210 cout <<
" ptLUT = [" << ptlut->
maxSize() <<
"] " << flush;
212 for (
unsigned int i = 0;
i < ptlut->
maxSize();
i++)
213 ptlut_[
i] = ptlut->
data(
i);
216 cout <<
" ptLUT = [0] " << endl;
219 const l1t::LUT *plut = ptr1->pdfLUT();
221 cout <<
" pdfLUT = [" << plut->
maxSize() <<
"] " << flush;
223 for (
unsigned int i = 0;
i < plut->
maxSize();
i++)
227 cout <<
" pdfLUT = [0] " << endl;
230 const l1t::LUT *mlut = ptr1->meanDistPhiLUT();
232 cout <<
" meanDistPhiLUT = [" << mlut->
maxSize() <<
"] " << flush;
234 for (
unsigned int i = 0;
i < mlut->
maxSize();
i++)
238 cout <<
" meanDistPhiLUT = [0] " << endl;