CMS 3D CMS Logo

EcalTrigPrimESProducer.cc
Go to the documentation of this file.
1 // user include files
3 
4 #include <TMath.h>
5 #include <fstream>
6 #include <iostream>
7 #include <sstream>
8 
10 
11 //
12 // input stream from a gz file
13 //
14 
15 struct GzInputStream {
16  gzFile gzf;
17  char buffer[256];
18  std::istringstream iss;
19  bool eof;
20  GzInputStream(const char *file) : eof(false) {
21  gzf = gzopen(file, "rb");
22  if (gzf == Z_NULL) {
23  eof = true;
24  edm::LogWarning("EcalTPG") << "Database file " << file << " not found!!!";
25  } else
26  readLine();
27  }
28  void readLine() {
29  char *res = gzgets(gzf, buffer, 256);
30  eof = (res == Z_NULL);
31  if (!eof) {
32  iss.clear();
33  iss.str(buffer);
34  }
35  }
36  ~GzInputStream() { gzclose(gzf); }
37  explicit operator bool() const { return ((eof == true) ? false : !iss.fail()); }
38 };
39 
40 template <typename T>
42  while ((bool)gis && !(gis.iss >> var)) {
43  gis.readLine();
44  }
45  return gis;
46 }
47 
48 //
49 // constructors and destructor
50 //
51 
53  : dbFilename_(iConfig.getUntrackedParameter<std::string>("DatabaseFile", "")),
54  flagPrint_(iConfig.getParameter<bool>("WriteInFile")) {
55  // the following line is needed to tell the framework what
56  // data is being produced
73  // now do what ever other initialization is needed
74 }
75 
77 
78 //
79 // member functions
80 //
81 
82 // ------------ method called to produce the data ------------
83 
84 std::unique_ptr<EcalTPGPedestals> EcalTrigPrimESProducer::producePedestals(const EcalTPGPedestalsRcd &iRecord) {
85  auto prod = std::make_unique<EcalTPGPedestals>();
86  parseTextFile();
87  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
88  for (it = mapXtal_.begin(); it != mapXtal_.end(); it++) {
90  item.mean_x12 = (it->second)[0];
91  item.mean_x6 = (it->second)[3];
92  item.mean_x1 = (it->second)[6];
93  prod->setValue(it->first, item);
94  }
95  return prod;
96 }
97 
98 std::unique_ptr<EcalTPGLinearizationConst> EcalTrigPrimESProducer::produceLinearizationConst(
99  const EcalTPGLinearizationConstRcd &iRecord) {
100  auto prod = std::make_unique<EcalTPGLinearizationConst>();
101  parseTextFile();
102  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
103  for (it = mapXtal_.begin(); it != mapXtal_.end(); it++) {
105  item.mult_x12 = (it->second)[1];
106  item.mult_x6 = (it->second)[4];
107  item.mult_x1 = (it->second)[7];
108  item.shift_x12 = (it->second)[2];
109  item.shift_x6 = (it->second)[5];
110  item.shift_x1 = (it->second)[8];
111  prod->setValue(it->first, item);
112  }
113  return prod;
114 }
115 
116 std::unique_ptr<EcalTPGSlidingWindow> EcalTrigPrimESProducer::produceSlidingWindow(
117  const EcalTPGSlidingWindowRcd &iRecord) {
118  auto prod = std::make_unique<EcalTPGSlidingWindow>();
119  parseTextFile();
120  for (int subdet = 0; subdet < 2; subdet++) {
121  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
122  for (it = mapStrip_[subdet].begin(); it != mapStrip_[subdet].end(); it++) {
123  prod->setValue(it->first, (it->second)[0]);
124  }
125  }
126  return prod;
127 }
128 
129 std::unique_ptr<EcalTPGFineGrainEBIdMap> EcalTrigPrimESProducer::produceFineGrainEB(
130  const EcalTPGFineGrainEBIdMapRcd &iRecord) {
131  auto prod = std::make_unique<EcalTPGFineGrainEBIdMap>();
132  parseTextFile();
134  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
135  for (it = mapFg_.begin(); it != mapFg_.end(); it++) {
136  fg.setValues((it->second)[0], (it->second)[1], (it->second)[2], (it->second)[3], (it->second)[4]);
137  prod->setValue(it->first, fg);
138  }
139  return prod;
140 }
141 
142 std::unique_ptr<EcalTPGFineGrainStripEE> EcalTrigPrimESProducer::produceFineGrainEEstrip(
143  const EcalTPGFineGrainStripEERcd &iRecord) {
144  auto prod = std::make_unique<EcalTPGFineGrainStripEE>();
145  parseTextFile();
146  // EE Strips
147  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
148  for (it = mapStrip_[1].begin(); it != mapStrip_[1].end(); it++) {
150  item.threshold = (it->second)[2];
151  item.lut = (it->second)[3];
152  prod->setValue(it->first, item);
153  }
154  // EB Strips
155  for (it = mapStrip_[0].begin(); it != mapStrip_[0].end(); it++) {
157  item.threshold = (it->second)[2];
158  item.lut = (it->second)[3];
159  prod->setValue(it->first, item);
160  }
161  return prod;
162 }
163 
164 std::unique_ptr<EcalTPGFineGrainTowerEE> EcalTrigPrimESProducer::produceFineGrainEEtower(
165  const EcalTPGFineGrainTowerEERcd &iRecord) {
166  auto prod = std::make_unique<EcalTPGFineGrainTowerEE>();
167  parseTextFile();
168  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
169  for (it = mapTower_[1].begin(); it != mapTower_[1].end(); it++) {
170  prod->setValue(it->first, (it->second)[1]);
171  }
172  return prod;
173 }
174 
175 std::unique_ptr<EcalTPGLutIdMap> EcalTrigPrimESProducer::produceLUT(const EcalTPGLutIdMapRcd &iRecord) {
176  auto prod = std::make_unique<EcalTPGLutIdMap>();
177  parseTextFile();
178  EcalTPGLut lut;
179  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
180  for (it = mapLut_.begin(); it != mapLut_.end(); it++) {
181  unsigned int lutArray[1024];
182  for (int i = 0; i < 1024; i++)
183  lutArray[i] = (it->second)[i];
184  lut.setLut(lutArray);
185  prod->setValue(it->first, lut);
186  }
187  return prod;
188 }
189 
190 std::unique_ptr<EcalTPGWeightIdMap> EcalTrigPrimESProducer::produceWeight(const EcalTPGWeightIdMapRcd &iRecord) {
191  auto prod = std::make_unique<EcalTPGWeightIdMap>();
192  parseTextFile();
194  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
195  for (it = mapWeight_.begin(); it != mapWeight_.end(); it++) {
196  weights.setValues((it->second)[0], (it->second)[1], (it->second)[2], (it->second)[3], (it->second)[4]);
197  prod->setValue(it->first, weights);
198  }
199  return prod;
200 }
201 
202 std::unique_ptr<EcalTPGWeightGroup> EcalTrigPrimESProducer::produceWeightGroup(const EcalTPGWeightGroupRcd &iRecord) {
203  auto prod = std::make_unique<EcalTPGWeightGroup>();
204  parseTextFile();
205  for (int subdet = 0; subdet < 2; subdet++) {
206  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
207  for (it = mapStrip_[subdet].begin(); it != mapStrip_[subdet].end(); it++) {
208  prod->setValue(it->first, (it->second)[1]);
209  }
210  }
211  return prod;
212 }
213 
214 std::unique_ptr<EcalTPGLutGroup> EcalTrigPrimESProducer::produceLutGroup(const EcalTPGLutGroupRcd &iRecord) {
215  auto prod = std::make_unique<EcalTPGLutGroup>();
216  parseTextFile();
217  for (int subdet = 0; subdet < 2; subdet++) {
218  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
219  for (it = mapTower_[subdet].begin(); it != mapTower_[subdet].end(); it++) {
220  prod->setValue(it->first, (it->second)[0]);
221  }
222  }
223  return prod;
224 }
225 
226 std::unique_ptr<EcalTPGFineGrainEBGroup> EcalTrigPrimESProducer::produceFineGrainEBGroup(
227  const EcalTPGFineGrainEBGroupRcd &iRecord) {
228  auto prod = std::make_unique<EcalTPGFineGrainEBGroup>();
229  parseTextFile();
230  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
231  for (it = mapTower_[0].begin(); it != mapTower_[0].end(); it++) {
232  prod->setValue(it->first, (it->second)[1]);
233  }
234  return prod;
235 }
236 
237 std::unique_ptr<EcalTPGPhysicsConst> EcalTrigPrimESProducer::producePhysicsConst(const EcalTPGPhysicsConstRcd &iRecord) {
238  auto prod = std::make_unique<EcalTPGPhysicsConst>();
239  parseTextFile();
240  std::map<uint32_t, std::vector<float>>::const_iterator it;
241  for (it = mapPhys_.begin(); it != mapPhys_.end(); it++) {
243  item.EtSat = (it->second)[0];
244  item.ttf_threshold_Low = (it->second)[1];
245  item.ttf_threshold_High = (it->second)[2];
246  item.FG_lowThreshold = (it->second)[3];
247  item.FG_highThreshold = (it->second)[4];
248  item.FG_lowRatio = (it->second)[5];
249  item.FG_highRatio = (it->second)[6];
250  prod->setValue(it->first, item);
251  }
252  return prod;
253 }
254 
255 std::unique_ptr<EcalTPGCrystalStatus> EcalTrigPrimESProducer::produceBadX(const EcalTPGCrystalStatusRcd &iRecord) {
256  auto prod = std::make_unique<EcalTPGCrystalStatus>();
257  parseTextFile();
258  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
259  for (it = mapXtal_.begin(); it != mapXtal_.end(); it++) {
260  EcalTPGCrystalStatusCode badXValue;
261  badXValue.setStatusCode(0);
262  prod->setValue(it->first, badXValue);
263  }
264  return prod;
265 }
266 
267 std::unique_ptr<EcalTPGStripStatus> EcalTrigPrimESProducer::produceBadStrip(const EcalTPGStripStatusRcd &iRecord) {
268  auto prod = std::make_unique<EcalTPGStripStatus>();
269  // returns an empty map
270  return prod;
271 }
272 
273 std::unique_ptr<EcalTPGTowerStatus> EcalTrigPrimESProducer::produceBadTT(const EcalTPGTowerStatusRcd &iRecord) {
274  auto prod = std::make_unique<EcalTPGTowerStatus>();
275  parseTextFile();
276  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
277  // Barrel
278  for (it = mapTower_[0].begin(); it != mapTower_[0].end(); it++) {
279  // set the BadTT status to 0
280  prod->setValue(it->first, 0);
281  }
282  // Endcap
283  for (it = mapTower_[1].begin(); it != mapTower_[1].end(); it++) {
284  // set the BadTT status to 0
285  prod->setValue(it->first, 0);
286  }
287 
288  return prod;
289 }
290 
291 std::unique_ptr<EcalTPGSpike> EcalTrigPrimESProducer::produceSpike(const EcalTPGSpikeRcd &iRecord) {
292  auto prod = std::make_unique<EcalTPGSpike>();
293  parseTextFile();
294  // Only need to do barrel
295  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
296  for (it = mapTower_[0].begin(); it != mapTower_[0].end(); ++it) {
297  prod->setValue(it->first, (it->second)[2]);
298  }
299  return prod;
300 }
301 
303  if (!mapXtal_.empty())
304  return; // just parse the file once!
305 
306  uint32_t id;
307  std::string dataCard;
309  std::ifstream infile;
310  std::vector<unsigned int> param;
311  std::vector<float> paramF;
312  int NBstripparams[2] = {4, 4};
313  unsigned int data;
314  float dataF;
315 
316  std::string bufString;
317  std::string iString;
318  std::string fString;
319  std::string filename = "SimCalorimetry/EcalTrigPrimProducers/data/" + dbFilename_;
320  std::string finalFileName;
321  size_t slash = dbFilename_.find('/');
322  if (slash != 0) {
323  edm::FileInPath fileInPath(filename);
324  finalFileName = fileInPath.fullPath();
325  } else {
326  finalFileName = dbFilename_;
327  edm::LogWarning("EcalTPG") << "Couldnt find database file via fileinpath, "
328  "trying with pathname directly!!";
329  }
330 
331  int k = 0;
332 
333  GzInputStream gis(finalFileName.c_str());
334  while (gis >> dataCard) {
335  if (dataCard == "PHYSICS_EB" || dataCard == "PHYSICS_EE") {
336  gis >> std::dec >> id;
337 
338  if (flagPrint_) {
339  std::cout << dataCard << " " << std::dec << id << std::endl;
340  }
341 
342  paramF.clear();
343 
344  std::string st1;
345  std::string st2;
346 
347  for (int i = 0; i < 7; i++) {
348  gis >> std::dec >> dataF;
349  paramF.push_back(dataF);
350 
351  // std::cout<<", "<<std::dec<<dataF ;
352  if (flagPrint_) {
353  //---------------------------------
354  if (i < 3) {
355  std::ostringstream oss;
356  oss << dataF;
357  std::string result1 = oss.str();
358 
359  st1.append(result1);
360  if (i != 2)
361  st1.append(" ");
362  }
363 
364  if (i > 2) {
365  std::ostringstream oss;
366  oss << dataF;
367  std::string result2 = oss.str();
368 
369  st2.append(result2);
370  if (i != 6)
371  st2.append(" ");
372  }
373  //----------------------------------
374  }
375  }
376 
377  if (flagPrint_) {
378  std::cout << "" << st1 << std::endl;
379  std::cout << "" << st2 << std::endl;
380  std::cout << "" << std::endl;
381  }
382 
383  // std::cout<<std::endl ;
384  mapPhys_[id] = paramF;
385  }
386 
387  if (dataCard == "CRYSTAL") {
388  gis >> std::dec >> id;
389  // std::cout<<dataCard<<" "<<std::dec<<id;
390  std::string st3;
391  std::string st4;
392  std::string st5;
393 
394  if (flagPrint_) {
395  // Print this comment only one time
396  if (k == 0)
397  std::cout << "COMMENT ====== barrel crystals ====== " << std::endl;
398 
399  if (k == 61200)
400  std::cout << "COMMENT ====== endcap crystals ====== " << std::endl;
401 
402  k = k + 1;
403 
404  std::cout << dataCard << " " << std::dec << id << std::endl;
405  }
406 
407  param.clear();
408  for (int i = 0; i < 9; i++) {
409  gis >> std::hex >> data;
410  // std::cout<<", "<<std::hex<<data ;
411  param.push_back(data);
412 
413  if (flagPrint_) {
414  if (i < 3) {
415  std::ostringstream oss;
416  oss << std::hex << data;
417  std::string result1 = oss.str();
418 
419  st3.append("0x");
420  st3.append(result1);
421  if (i != 2)
422  st3.append(" ");
423 
424  } else if (i > 2 && i < 6) {
425  std::ostringstream oss;
426  oss << std::hex << data;
427  std::string result2 = oss.str();
428 
429  st4.append("0x");
430  st4.append(result2);
431  if (i != 5)
432  st4.append(" ");
433  } else if (i > 5 && i < 9) {
434  std::ostringstream oss;
435  oss << std::hex << data;
436  std::string result3 = oss.str();
437 
438  st5.append("0x");
439  st5.append(result3);
440  if (i != 8)
441  st5.append(" ");
442  }
443  }
444 
445  } // end for
446 
447  if (flagPrint_) {
448  std::cout << " " << st3 << std::endl;
449  std::cout << " " << st4 << std::endl;
450  std::cout << " " << st5 << std::endl;
451  }
452 
453  // std::cout<<std::endl ;
454  mapXtal_[id] = param;
455  }
456 
457  if (dataCard == "STRIP_EB") {
458  gis >> std::dec >> id;
459 
460  std::string st1;
461 
462  if (flagPrint_)
463  std::cout << dataCard << " " << std::dec << id << std::endl;
464 
465  param.clear();
466  for (int i = 0; i < NBstripparams[0]; i++) {
467  gis >> std::hex >> data;
468  // std::cout << " data = " << data << std::endl;
469  param.push_back(data);
470 
471  if (flagPrint_) {
472  if (i == 0) {
473  std::cout << "0x" << std::hex << data << std::endl;
474  } else if (i == 1) {
475  std::cout << "" << std::hex << data << std::endl;
476  } else if (i > 1) {
477  std::ostringstream oss;
478  if (i == 2) {
479  oss << "0x" << std::hex << data;
480  std::string result4 = oss.str();
481  st1.append(result4);
482  } else if (i == 3) {
483  std::ostringstream oss;
484  oss << " 0x" << std::hex << data;
485  std::string result5 = oss.str();
486 
487  st1.append(result5);
488  std::cout << "" << st1 << std::endl;
489  }
490  }
491  }
492  }
493 
494  // std::cout<<std::endl ;
495  mapStrip_[0][id] = param;
496  }
497 
498  if (dataCard == "STRIP_EE") {
499  gis >> std::dec >> id;
500 
501  std::string st6;
502 
503  if (flagPrint_) {
504  std::cout << dataCard << " " << std::dec << id << std::endl;
505  }
506 
507  param.clear();
508  for (int i = 0; i < NBstripparams[1]; i++) {
509  gis >> std::hex >> data;
510  param.push_back(data);
511 
512  if (flagPrint_) {
513  if (i == 0) {
514  std::cout << "0x" << std::hex << data << std::endl;
515  } else if (i == 1) {
516  std::cout << " " << std::hex << data << std::endl;
517  } else if (i > 1) {
518  std::ostringstream oss;
519  if (i == 2) {
520  oss << "0x" << std::hex << data;
521  std::string result4 = oss.str();
522  st6.append(result4);
523  } else if (i == 3) {
524  std::ostringstream oss;
525  oss << " 0x" << std::hex << data;
526  std::string result5 = oss.str();
527 
528  st6.append(result5);
529  std::cout << "" << st6 << std::endl;
530  }
531  }
532  }
533  }
534 
535  // std::cout<<std::endl ;
536  mapStrip_[1][id] = param;
537  }
538 
539  if (dataCard == "TOWER_EE") {
540  gis >> std::dec >> id;
541 
542  if (flagPrint_)
543  std::cout << dataCard << " " << std::dec << id << std::endl;
544 
545  param.clear();
546  for (int i = 0; i < 2; i++) {
547  gis >> std::hex >> data;
548  param.push_back(data);
549 
550  if (flagPrint_) {
551  if (i == 1) {
552  std::cout << "0x" << std::dec << data << std::endl;
553  } else {
554  std::cout << " " << std::dec << data << std::endl;
555  }
556  }
557  }
558 
559  // std::cout<<std::endl ;
560  mapTower_[1][id] = param;
561  }
562 
563  if (dataCard == "TOWER_EB") {
564  gis >> std::dec >> id;
565 
566  if (flagPrint_)
567  std::cout << dataCard << " " << std::dec << id << std::endl;
568 
569  param.clear();
570  for (int i = 0; i < 3; i++) {
571  gis >> std::dec >> data;
572 
573  if (flagPrint_) {
574  std::cout << " " << std::dec << data << std::endl;
575  }
576 
577  param.push_back(data);
578  }
579 
580  // std::cout<<std::endl ;
581  mapTower_[0][id] = param;
582  }
583 
584  if (dataCard == "WEIGHT") {
585  if (flagPrint_)
586  std::cout << std::endl;
587 
588  gis >> std::hex >> id;
589  if (flagPrint_) {
590  std::cout << dataCard << " " << std::dec << id << std::endl;
591  }
592 
593  param.clear();
594 
595  std::string st6;
596  for (int i = 0; i < 5; i++) {
597  gis >> std::hex >> data;
598  param.push_back(data);
599 
600  if (flagPrint_) {
601  std::ostringstream oss;
602  oss << std::hex << data;
603  std::string result4 = oss.str();
604 
605  st6.append("0x");
606  st6.append(result4);
607  st6.append(" ");
608  }
609  }
610 
611  if (flagPrint_) {
612  std::cout << st6 << std::endl;
613  std::cout << std::endl;
614  }
615 
616  // std::cout<<std::endl ;
617  mapWeight_[id] = param;
618  }
619 
620  if (dataCard == "FG") {
621  if (flagPrint_)
622  std::cout << std::endl;
623 
624  gis >> std::hex >> id;
625  if (flagPrint_)
626  std::cout << dataCard << " " << std::dec << id << std::endl;
627 
628  param.clear();
629  std::string st7;
630  for (int i = 0; i < 5; i++) {
631  gis >> std::hex >> data;
632  param.push_back(data);
633 
634  if (flagPrint_) {
635  std::ostringstream oss;
636  oss << std::hex << data;
637 
638  std::string result5 = oss.str();
639 
640  st7.append("0x");
641  st7.append(result5);
642  if (i != 4)
643  st7.append(" ");
644  }
645  }
646 
647  if (flagPrint_) {
648  std::cout << st7 << std::endl;
649  std::cout << std::endl;
650  }
651 
652  mapFg_[id] = param;
653  }
654 
655  if (dataCard == "LUT") {
656  gis >> std::hex >> id;
657 
658  if (flagPrint_)
659  std::cout << dataCard << " " << std::dec << id << std::endl;
660 
661  param.clear();
662  for (int i = 0; i < 1024; i++) {
663  gis >> std::hex >> data;
664  param.push_back(data);
665 
666  if (flagPrint_) {
667  std::cout << "0x" << std::hex << data << std::endl;
668  }
669  }
670 
671  if (flagPrint_) {
672  std::cout << std::endl;
673  std::cout << std::endl;
674  }
675 
676  mapLut_[id] = param;
677  }
678  }
679 }
680 
682  int subdet, int tccNb, int towerNbInTcc, int stripNbInTower, int xtalNbInStrip) {
683  std::vector<int> range;
684  if (subdet == 0) {
685  // Barrel
686  range.push_back(37); // stccNbMin
687  range.push_back(73); // tccNbMax
688  range.push_back(1); // towerNbMin
689  range.push_back(69); // towerNbMax
690  range.push_back(1); // stripNbMin
691  range.push_back(6); // stripNbMax
692  range.push_back(1); // xtalNbMin
693  range.push_back(6); // xtalNbMax
694  } else {
695  // Endcap eta >0
696  if (subdet > 0) {
697  range.push_back(73); // tccNbMin
698  range.push_back(109); // tccNbMax
699  } else { // endcap eta <0
700  range.push_back(1); // tccNbMin
701  range.push_back(37); // tccNbMax
702  }
703  range.push_back(1); // towerNbMin
704  range.push_back(29); // towerNbMax
705  range.push_back(1); // stripNbMin
706  range.push_back(6); // stripNbMax
707  range.push_back(1); // xtalNbMin
708  range.push_back(6); // xtalNbMax
709  }
710 
711  if (tccNb > 0) {
712  range[0] = tccNb;
713  range[1] = tccNb + 1;
714  }
715  if (towerNbInTcc > 0) {
716  range[2] = towerNbInTcc;
717  range[3] = towerNbInTcc + 1;
718  }
719  if (stripNbInTower > 0) {
720  range[4] = stripNbInTower;
721  range[5] = stripNbInTower + 1;
722  }
723  if (xtalNbInStrip > 0) {
724  range[6] = xtalNbInStrip;
725  range[7] = xtalNbInStrip + 1;
726  }
727 
728  return range;
729 }
730 
731 // bool EcalTrigPrimESProducer::getNextString(gzFile &gzf){
732 // size_t blank;
733 // if (bufpos_==0) {
734 // gzgets(gzf,buf_,80);
735 // if (gzeof(gzf)) return true;
736 // bufString_=std::string(buf_);
737 // }
738 // int pos=0;
739 // pos =bufpos_;
740 // // look for next non-blank
741 // while (pos<bufString_.size()) {
742 // if (!bufString_.compare(pos,1," ")) pos++;
743 // else break;
744 // }
745 // blank=bufString_.find(" ",pos);
746 // size_t end = blank;
747 // if (blank==std::string::npos) end=bufString_.size();
748 // sub_=bufString_.substr(pos,end-pos);
749 // bufpos_= blank;
750 // if (blank==std::string::npos) bufpos_=0;
751 // return false;
752 // }
753 //
754 // int EcalTrigPrimESProducer::converthex() {
755 // // converts hex dec string sub to hexa
756 // //FIXME:: find something better (istrstream?)!!!!
757 //
758 // std::string chars("0123456789abcdef");
759 // int hex=0;
760 // for (size_t i=2;i<sub_.length();++i) {
761 // size_t f=chars.find(sub_[i]);
762 // if (f==std::string::npos) break; //FIXME: length is 4 for 0x3!!
763 // hex=hex*16+chars.find(sub_[i]);
764 // }
765 // return hex;
766 // }
EcalTrigPrimESProducer::produceSpike
std::unique_ptr< EcalTPGSpike > produceSpike(const EcalTPGSpikeRcd &)
Definition: EcalTrigPrimESProducer.cc:291
EcalTrigPrimESProducer::produceFineGrainEBGroup
std::unique_ptr< EcalTPGFineGrainEBGroup > produceFineGrainEBGroup(const EcalTPGFineGrainEBGroupRcd &)
Definition: EcalTrigPrimESProducer.cc:226
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
electrons_cff.bool
bool
Definition: electrons_cff.py:393
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
EcalTrigPrimESProducer::produceSlidingWindow
std::unique_ptr< EcalTPGSlidingWindow > produceSlidingWindow(const EcalTPGSlidingWindowRcd &)
Definition: EcalTrigPrimESProducer.cc:116
EcalTPGFineGrainTowerEERcd
Definition: EcalTPGFineGrainTowerEERcd.h:5
EcalTrigPrimESProducer::produceFineGrainEEtower
std::unique_ptr< EcalTPGFineGrainTowerEE > produceFineGrainEEtower(const EcalTPGFineGrainTowerEERcd &)
Definition: EcalTrigPrimESProducer.cc:164
EcalTrigPrimESProducer::EcalTrigPrimESProducer
EcalTrigPrimESProducer(const edm::ParameterSet &)
Definition: EcalTrigPrimESProducer.cc:52
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalTPGCrystalStatusRcd
Definition: EcalTPGCrystalStatusRcd.h:5
EcalTPGFineGrainConstEB::setValues
void setValues(const uint32_t &ThresholdETLow, const uint32_t &ThresholdETHigh, const uint32_t &RatioLow, const uint32_t &RatioHigh, const uint32_t &LUT)
Definition: EcalTPGFineGrainConstEB.cc:17
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
GzInputStream
Definition: EcalTrigPrimESProducer.cc:15
EcalTrigPrimESProducer::produceLutGroup
std::unique_ptr< EcalTPGLutGroup > produceLutGroup(const EcalTPGLutGroupRcd &)
Definition: EcalTrigPrimESProducer.cc:214
EcalTPGPedestalsRcd
Definition: EcalTPGPedestalsRcd.h:5
GzInputStream::iss
std::istringstream iss
Definition: EcalTrigPrimESProducer.cc:18
EcalTPGFineGrainStripEE::Item
Definition: EcalTPGFineGrainStripEE.h:14
EcalTPGFineGrainConstEB
Definition: EcalTPGFineGrainConstEB.h:7
EcalTPGPedestal
Definition: EcalTPGPedestals.h:8
EcalTrigPrimESProducer::mapPhys_
std::map< uint32_t, std::vector< float > > mapPhys_
Definition: EcalTrigPrimESProducer.h:85
EcalTPGLinearizationConstant
Definition: EcalTPGLinearizationConst.h:8
EcalTrigPrimESProducer::mapLut_
std::map< uint32_t, std::vector< uint32_t > > mapLut_
Definition: EcalTrigPrimESProducer.h:84
EcalTrigPrimESProducer::mapWeight_
std::map< uint32_t, std::vector< uint32_t > > mapWeight_
Definition: EcalTrigPrimESProducer.h:82
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalTPGFineGrainStripEERcd
Definition: EcalTPGFineGrainStripEERcd.h:5
EcalTrigPrimESProducer::~EcalTrigPrimESProducer
~EcalTrigPrimESProducer() override
Definition: EcalTrigPrimESProducer.cc:76
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
edm::FileInPath
Definition: FileInPath.h:64
EcalTPGStripStatusRcd
Definition: EcalTPGStripStatusRcd.h:5
GzInputStream::gzf
gzFile gzf
Definition: EcalTrigPrimESProducer.cc:16
EcalTrigPrimESProducer::mapFg_
std::map< uint32_t, std::vector< uint32_t > > mapFg_
Definition: EcalTrigPrimESProducer.h:83
EcalTrigPrimESProducer.h
EcalTrigPrimESProducer::getRange
std::vector< int > getRange(int subdet, int smNb, int towerNbInSm, int stripNbInTower=0, int xtalNbInStrip=0)
Definition: EcalTrigPrimESProducer.cc:681
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99178
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
EcalTPGSpikeRcd
Definition: EcalTPGSpikeRcd.h:5
EcalTPGLut::setLut
void setLut(const unsigned int *lut)
Definition: EcalTPGLut.cc:15
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
EcalTPGFineGrainEBGroupRcd
Definition: EcalTPGFineGrainEBGroupRcd.h:5
operator>>
GzInputStream & operator>>(GzInputStream &gis, T &var)
Definition: EcalTrigPrimESProducer.cc:41
EcalTrigPrimESProducer::produceBadStrip
std::unique_ptr< EcalTPGStripStatus > produceBadStrip(const EcalTPGStripStatusRcd &)
Definition: EcalTrigPrimESProducer.cc:267
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTrigPrimESProducer::mapStrip_
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
Definition: EcalTrigPrimESProducer.h:80
EcalTrigPrimESProducer::produceFineGrainEEstrip
std::unique_ptr< EcalTPGFineGrainStripEE > produceFineGrainEEstrip(const EcalTPGFineGrainStripEERcd &)
Definition: EcalTrigPrimESProducer.cc:142
EcalTrigPrimESProducer::produceWeightGroup
std::unique_ptr< EcalTPGWeightGroup > produceWeightGroup(const EcalTPGWeightGroupRcd &)
Definition: EcalTrigPrimESProducer.cc:202
edm::ParameterSet
Definition: ParameterSet.h:47
EcalTrigPrimESProducer::produceWeight
std::unique_ptr< EcalTPGWeightIdMap > produceWeight(const EcalTPGWeightIdMapRcd &)
Definition: EcalTrigPrimESProducer.cc:190
EcalTPGPhysicsConst::Item
Definition: EcalTPGPhysicsConst.h:14
EcalTPGCrystalStatusCode::setStatusCode
void setStatusCode(const uint16_t &val)
Definition: EcalTPGCrystalStatusCode.h:29
EcalTPGFineGrainEBIdMapRcd
Definition: EcalTPGFineGrainEBIdMapRcd.h:5
EcalTrigPrimESProducer::parseTextFile
void parseTextFile()
Definition: EcalTrigPrimESProducer.cc:302
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
EcalTrigPrimESProducer::produceLinearizationConst
std::unique_ptr< EcalTPGLinearizationConst > produceLinearizationConst(const EcalTPGLinearizationConstRcd &)
Definition: EcalTrigPrimESProducer.cc:98
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
EcalTrigPrimESProducer::produceLUT
std::unique_ptr< EcalTPGLutIdMap > produceLUT(const EcalTPGLutIdMapRcd &)
Definition: EcalTrigPrimESProducer.cc:175
res
Definition: Electron.h:6
EcalTrigPrimESProducer::dbFilename_
std::string dbFilename_
Definition: EcalTrigPrimESProducer.h:77
GzInputStream::~GzInputStream
~GzInputStream()
Definition: EcalTrigPrimESProducer.cc:36
EcalTPGWeightGroupRcd
Definition: EcalTPGWeightGroupRcd.h:5
EcalTrigPrimESProducer::mapTower_
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
Definition: EcalTrigPrimESProducer.h:81
EcalTPGLut
Definition: EcalTPGLut.h:6
EcalTrigPrimESProducer::produceBadX
std::unique_ptr< EcalTPGCrystalStatus > produceBadX(const EcalTPGCrystalStatusRcd &)
Definition: EcalTrigPrimESProducer.cc:255
EcalTPGLutIdMapRcd
Definition: EcalTPGLutIdMapRcd.h:5
EcalTPGWeights
Definition: EcalTPGWeights.h:9
std
Definition: JetResolutionObject.h:76
pickleFileParser.slash
slash
Definition: pickleFileParser.py:12
EcalTPGWeightIdMapRcd
Definition: EcalTPGWeightIdMapRcd.h:5
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
EcalTPGSlidingWindowRcd
Definition: EcalTPGSlidingWindowRcd.h:5
EcalTPGCrystalStatusCode
Definition: EcalTPGCrystalStatusCode.h:14
EcalTrigPrimESProducer::mapXtal_
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
Definition: EcalTrigPrimESProducer.h:79
EcalTrigPrimESProducer::produceBadTT
std::unique_ptr< EcalTPGTowerStatus > produceBadTT(const EcalTPGTowerStatusRcd &)
Definition: EcalTrigPrimESProducer.cc:273
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
GzInputStream::eof
bool eof
Definition: EcalTrigPrimESProducer.cc:19
EcalTrigPrimESProducer::producePhysicsConst
std::unique_ptr< EcalTPGPhysicsConst > producePhysicsConst(const EcalTPGPhysicsConstRcd &)
Definition: EcalTrigPrimESProducer.cc:237
timingPdfMaker.infile
infile
Definition: timingPdfMaker.py:350
EcalTrigPrimESProducer::producePedestals
std::unique_ptr< EcalTPGPedestals > producePedestals(const EcalTPGPedestalsRcd &)
Definition: EcalTrigPrimESProducer.cc:84
EcalTPGLutGroupRcd
Definition: EcalTPGLutGroupRcd.h:5
GzInputStream::buffer
char buffer[256]
Definition: EcalTrigPrimESProducer.cc:17
mps_splice.line
line
Definition: mps_splice.py:76
EcalTrigPrimESProducer::produceFineGrainEB
std::unique_ptr< EcalTPGFineGrainEBIdMap > produceFineGrainEB(const EcalTPGFineGrainEBIdMapRcd &)
Definition: EcalTrigPrimESProducer.cc:129
EcalTPGTowerStatusRcd
Definition: EcalTPGTowerStatusRcd.h:5
EcalTPGLinearizationConstRcd
Definition: EcalTPGLinearizationConstRcd.h:5
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
GzInputStream::GzInputStream
GzInputStream(const char *file)
Definition: EcalTrigPrimESProducer.cc:20
EcalTPGPhysicsConstRcd
Definition: EcalTPGPhysicsConstRcd.h:5
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163
EcalTrigPrimESProducer::flagPrint_
bool flagPrint_
Definition: EcalTrigPrimESProducer.h:78
GzInputStream::readLine
void readLine()
Definition: EcalTrigPrimESProducer.cc:28