CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalTrigPrimESProducer Class Reference

#include <EcalTrigPrimESProducer.h>

Inheritance diagram for EcalTrigPrimESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 EcalTrigPrimESProducer (const edm::ParameterSet &)
 
std::unique_ptr< EcalTPGStripStatusproduceBadStrip (const EcalTPGStripStatusRcd &)
 
std::unique_ptr< EcalTPGTowerStatusproduceBadTT (const EcalTPGTowerStatusRcd &)
 
std::unique_ptr< EcalTPGCrystalStatusproduceBadX (const EcalTPGCrystalStatusRcd &)
 
std::unique_ptr< EcalTPGFineGrainEBIdMapproduceFineGrainEB (const EcalTPGFineGrainEBIdMapRcd &)
 
std::unique_ptr< EcalTPGFineGrainEBGroupproduceFineGrainEBGroup (const EcalTPGFineGrainEBGroupRcd &)
 
std::unique_ptr< EcalTPGFineGrainStripEEproduceFineGrainEEstrip (const EcalTPGFineGrainStripEERcd &)
 
std::unique_ptr< EcalTPGFineGrainTowerEEproduceFineGrainEEtower (const EcalTPGFineGrainTowerEERcd &)
 
std::unique_ptr< EcalTPGLinearizationConstproduceLinearizationConst (const EcalTPGLinearizationConstRcd &)
 
std::unique_ptr< EcalTPGLutIdMapproduceLUT (const EcalTPGLutIdMapRcd &)
 
std::unique_ptr< EcalTPGLutGroupproduceLutGroup (const EcalTPGLutGroupRcd &)
 
std::unique_ptr< EcalTPGPedestalsproducePedestals (const EcalTPGPedestalsRcd &)
 
std::unique_ptr< EcalTPGPhysicsConstproducePhysicsConst (const EcalTPGPhysicsConstRcd &)
 
std::unique_ptr< EcalTPGSlidingWindowproduceSlidingWindow (const EcalTPGSlidingWindowRcd &)
 
std::unique_ptr< EcalTPGSpikeproduceSpike (const EcalTPGSpikeRcd &)
 
std::unique_ptr< EcalTPGWeightIdMapproduceWeight (const EcalTPGWeightIdMapRcd &)
 
std::unique_ptr< EcalTPGWeightGroupproduceWeightGroup (const EcalTPGWeightGroupRcd &)
 
 ~EcalTrigPrimESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Member Functions

std::vector< int > getRange (int subdet, int smNb, int towerNbInSm, int stripNbInTower=0, int xtalNbInStrip=0)
 
void parseTextFile ()
 

Private Attributes

std::string dbFilename_
 
bool flagPrint_
 
std::map< uint32_t, std::vector< uint32_t > > mapFg_
 
std::map< uint32_t, std::vector< uint32_t > > mapLut_
 
std::map< uint32_t, std::vector< float > > mapPhys_
 
std::map< uint32_t, std::vector< uint32_t > > mapStrip_ [2]
 
std::map< uint32_t, std::vector< uint32_t > > mapTower_ [2]
 
std::map< uint32_t, std::vector< uint32_t > > mapWeight_
 
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 50 of file EcalTrigPrimESProducer.h.

Constructor & Destructor Documentation

◆ EcalTrigPrimESProducer()

EcalTrigPrimESProducer::EcalTrigPrimESProducer ( const edm::ParameterSet iConfig)

Definition at line 52 of file EcalTrigPrimESProducer.cc.

References produceBadStrip(), produceBadTT(), produceBadX(), produceFineGrainEB(), produceFineGrainEBGroup(), produceFineGrainEEstrip(), produceFineGrainEEtower(), produceLinearizationConst(), produceLUT(), produceLutGroup(), producePedestals(), producePhysicsConst(), produceSlidingWindow(), produceSpike(), produceWeight(), produceWeightGroup(), and edm::ESProducer::setWhatProduced().

◆ ~EcalTrigPrimESProducer()

EcalTrigPrimESProducer::~EcalTrigPrimESProducer ( )
override

Definition at line 76 of file EcalTrigPrimESProducer.cc.

76 {}

Member Function Documentation

◆ getRange()

std::vector< int > EcalTrigPrimESProducer::getRange ( int  subdet,
int  smNb,
int  towerNbInSm,
int  stripNbInTower = 0,
int  xtalNbInStrip = 0 
)
private

Definition at line 681 of file EcalTrigPrimESProducer.cc.

682  {
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 }

References FastTimerService_cff::range.

◆ parseTextFile()

void EcalTrigPrimESProducer::parseTextFile ( )
private

Definition at line 302 of file EcalTrigPrimESProducer.cc.

302  {
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 }

References gather_cfg::cout, data, dbFilename_, TauDecayModes::dec, corrVsCorr::filename, flagPrint_, edm::FileInPath::fullPath(), mps_fire::i, triggerObjects_cff::id, timingPdfMaker::infile, dqmdumpme::k, mps_splice::line, mapFg_, mapLut_, mapPhys_, mapStrip_, mapTower_, mapWeight_, mapXtal_, pickleFileParser::slash, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produceBadTT(), produceBadX(), produceFineGrainEB(), produceFineGrainEBGroup(), produceFineGrainEEstrip(), produceFineGrainEEtower(), produceLinearizationConst(), produceLUT(), produceLutGroup(), producePedestals(), producePhysicsConst(), produceSlidingWindow(), produceSpike(), produceWeight(), and produceWeightGroup().

◆ produceBadStrip()

std::unique_ptr< EcalTPGStripStatus > EcalTrigPrimESProducer::produceBadStrip ( const EcalTPGStripStatusRcd iRecord)

Definition at line 267 of file EcalTrigPrimESProducer.cc.

267  {
268  auto prod = std::make_unique<EcalTPGStripStatus>();
269  // returns an empty map
270  return prod;
271 }

References dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceBadTT()

std::unique_ptr< EcalTPGTowerStatus > EcalTrigPrimESProducer::produceBadTT ( const EcalTPGTowerStatusRcd iRecord)

Definition at line 273 of file EcalTrigPrimESProducer.cc.

273  {
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 }

References mapTower_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceBadX()

std::unique_ptr< EcalTPGCrystalStatus > EcalTrigPrimESProducer::produceBadX ( const EcalTPGCrystalStatusRcd iRecord)

Definition at line 255 of file EcalTrigPrimESProducer.cc.

255  {
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 }

References mapXtal_, parseTextFile(), dumpMFGeometry_cfg::prod, and EcalTPGCrystalStatusCode::setStatusCode().

Referenced by EcalTrigPrimESProducer().

◆ produceFineGrainEB()

std::unique_ptr< EcalTPGFineGrainEBIdMap > EcalTrigPrimESProducer::produceFineGrainEB ( const EcalTPGFineGrainEBIdMapRcd iRecord)

Definition at line 129 of file EcalTrigPrimESProducer.cc.

130  {
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 }

References mapFg_, parseTextFile(), dumpMFGeometry_cfg::prod, and EcalTPGFineGrainConstEB::setValues().

Referenced by EcalTrigPrimESProducer().

◆ produceFineGrainEBGroup()

std::unique_ptr< EcalTPGFineGrainEBGroup > EcalTrigPrimESProducer::produceFineGrainEBGroup ( const EcalTPGFineGrainEBGroupRcd iRecord)

Definition at line 226 of file EcalTrigPrimESProducer.cc.

227  {
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 }

References mapTower_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceFineGrainEEstrip()

std::unique_ptr< EcalTPGFineGrainStripEE > EcalTrigPrimESProducer::produceFineGrainEEstrip ( const EcalTPGFineGrainStripEERcd iRecord)

Definition at line 142 of file EcalTrigPrimESProducer.cc.

143  {
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 }

References B2GTnPMonitor_cfi::item, mapStrip_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceFineGrainEEtower()

std::unique_ptr< EcalTPGFineGrainTowerEE > EcalTrigPrimESProducer::produceFineGrainEEtower ( const EcalTPGFineGrainTowerEERcd iRecord)

Definition at line 164 of file EcalTrigPrimESProducer.cc.

165  {
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 }

References mapTower_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceLinearizationConst()

std::unique_ptr< EcalTPGLinearizationConst > EcalTrigPrimESProducer::produceLinearizationConst ( const EcalTPGLinearizationConstRcd iRecord)

Definition at line 98 of file EcalTrigPrimESProducer.cc.

99  {
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 }

References B2GTnPMonitor_cfi::item, mapXtal_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceLUT()

std::unique_ptr< EcalTPGLutIdMap > EcalTrigPrimESProducer::produceLUT ( const EcalTPGLutIdMapRcd iRecord)

Definition at line 175 of file EcalTrigPrimESProducer.cc.

175  {
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 }

References mps_fire::i, mapLut_, parseTextFile(), dumpMFGeometry_cfg::prod, and EcalTPGLut::setLut().

Referenced by EcalTrigPrimESProducer().

◆ produceLutGroup()

std::unique_ptr< EcalTPGLutGroup > EcalTrigPrimESProducer::produceLutGroup ( const EcalTPGLutGroupRcd iRecord)

Definition at line 214 of file EcalTrigPrimESProducer.cc.

214  {
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 }

References mapTower_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ producePedestals()

std::unique_ptr< EcalTPGPedestals > EcalTrigPrimESProducer::producePedestals ( const EcalTPGPedestalsRcd iRecord)

Definition at line 84 of file EcalTrigPrimESProducer.cc.

84  {
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 }

References B2GTnPMonitor_cfi::item, mapXtal_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ producePhysicsConst()

std::unique_ptr< EcalTPGPhysicsConst > EcalTrigPrimESProducer::producePhysicsConst ( const EcalTPGPhysicsConstRcd iRecord)

Definition at line 237 of file EcalTrigPrimESProducer.cc.

237  {
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 }

References B2GTnPMonitor_cfi::item, mapPhys_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceSlidingWindow()

std::unique_ptr< EcalTPGSlidingWindow > EcalTrigPrimESProducer::produceSlidingWindow ( const EcalTPGSlidingWindowRcd iRecord)

Definition at line 116 of file EcalTrigPrimESProducer.cc.

117  {
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 }

References mapStrip_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceSpike()

std::unique_ptr< EcalTPGSpike > EcalTrigPrimESProducer::produceSpike ( const EcalTPGSpikeRcd iRecord)

Definition at line 291 of file EcalTrigPrimESProducer.cc.

291  {
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 }

References mapTower_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

◆ produceWeight()

std::unique_ptr< EcalTPGWeightIdMap > EcalTrigPrimESProducer::produceWeight ( const EcalTPGWeightIdMapRcd iRecord)

Definition at line 190 of file EcalTrigPrimESProducer.cc.

190  {
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 }

References mapWeight_, parseTextFile(), dumpMFGeometry_cfg::prod, and HLT_FULL_cff::weights.

Referenced by EcalTrigPrimESProducer().

◆ produceWeightGroup()

std::unique_ptr< EcalTPGWeightGroup > EcalTrigPrimESProducer::produceWeightGroup ( const EcalTPGWeightGroupRcd iRecord)

Definition at line 202 of file EcalTrigPrimESProducer.cc.

202  {
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 }

References mapStrip_, parseTextFile(), and dumpMFGeometry_cfg::prod.

Referenced by EcalTrigPrimESProducer().

Member Data Documentation

◆ dbFilename_

std::string EcalTrigPrimESProducer::dbFilename_
private

Definition at line 77 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile().

◆ flagPrint_

bool EcalTrigPrimESProducer::flagPrint_
private

Definition at line 78 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile().

◆ mapFg_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapFg_
private

Definition at line 83 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceFineGrainEB().

◆ mapLut_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapLut_
private

Definition at line 84 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceLUT().

◆ mapPhys_

std::map<uint32_t, std::vector<float> > EcalTrigPrimESProducer::mapPhys_
private

Definition at line 85 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and producePhysicsConst().

◆ mapStrip_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapStrip_[2]
private

◆ mapTower_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapTower_[2]
private

◆ mapWeight_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapWeight_
private

Definition at line 82 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceWeight().

◆ mapXtal_

std::map<uint32_t, std::vector<uint32_t> > EcalTrigPrimESProducer::mapXtal_
private
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
mps_fire.i
i
Definition: mps_fire.py:428
EcalTrigPrimESProducer::produceSlidingWindow
std::unique_ptr< EcalTPGSlidingWindow > produceSlidingWindow(const EcalTPGSlidingWindowRcd &)
Definition: EcalTrigPrimESProducer.cc:116
EcalTrigPrimESProducer::produceFineGrainEEtower
std::unique_ptr< EcalTPGFineGrainTowerEE > produceFineGrainEEtower(const EcalTPGFineGrainTowerEERcd &)
Definition: EcalTrigPrimESProducer.cc:164
gather_cfg.cout
cout
Definition: gather_cfg.py:144
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
EcalTPGFineGrainStripEE::Item
Definition: EcalTPGFineGrainStripEE.h:14
EcalTPGFineGrainConstEB
Definition: EcalTPGFineGrainConstEB.h:7
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
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
edm::FileInPath
Definition: FileInPath.h:64
EcalTrigPrimESProducer::mapFg_
std::map< uint32_t, std::vector< uint32_t > > mapFg_
Definition: EcalTrigPrimESProducer.h:83
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99166
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
EcalTPGLut::setLut
void setLut(const unsigned int *lut)
Definition: EcalTPGLut.cc:15
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
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
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
EcalTrigPrimESProducer::parseTextFile
void parseTextFile()
Definition: EcalTrigPrimESProducer.cc:302
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
EcalTrigPrimESProducer::dbFilename_
std::string dbFilename_
Definition: EcalTrigPrimESProducer.h:77
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
EcalTPGWeights
Definition: EcalTPGWeights.h:9
pickleFileParser.slash
slash
Definition: pickleFileParser.py:12
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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
mps_splice.line
line
Definition: mps_splice.py:76
EcalTrigPrimESProducer::produceFineGrainEB
std::unique_ptr< EcalTPGFineGrainEBIdMap > produceFineGrainEB(const EcalTPGFineGrainEBIdMapRcd &)
Definition: EcalTrigPrimESProducer.cc:129
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
EcalTrigPrimESProducer::flagPrint_
bool flagPrint_
Definition: EcalTrigPrimESProducer.h:78