CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
EcalEBTrigPrimPhase2ESProducer Class Reference
Inheritance diagram for EcalEBTrigPrimPhase2ESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

 EcalEBTrigPrimPhase2ESProducer (const edm::ParameterSet &)
 
std::unique_ptr< EcalEBPhase2TPGAmplWeightIdMapproduceAmpWeight (const EcalEBPhase2TPGAmplWeightIdMapRcd &)
 
std::unique_ptr< EcalTPGCrystalStatusproduceBadX (const EcalTPGCrystalStatusRcd &)
 
std::unique_ptr< EcalEBPhase2TPGLinearizationConstproduceLinearizationConst (const EcalEBPhase2TPGLinearizationConstRcd &)
 
std::unique_ptr< EcalEBPhase2TPGPedestalsMapproducePedestals (const EcalEBPhase2TPGPedestalsRcd &)
 
std::unique_ptr< EcalTPGPhysicsConstproducePhysicsConst (const EcalTPGPhysicsConstRcd &)
 
std::unique_ptr< EcalEBPhase2TPGTimeWeightIdMapproduceTimeWeight (const EcalEBPhase2TPGTimeWeightIdMapRcd &)
 
std::unique_ptr< EcalTPGWeightGroupproduceWeightGroup (const EcalTPGWeightGroupRcd &)
 
 ~EcalEBTrigPrimPhase2ESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Private Member Functions

std::vector< int > getRange (int subdet, int smNb, int towerNbInSm, int stripNbInTower=0, int xtalNbInStrip=0)
 This method is not used at all, however is a reminder that something alike will probably be needed once the mapping EB to BCPs will be in place. More...
 
void parseTextFile ()
 
void parseWeightsFile ()
 

Private Attributes

const edm::FileInPath configFilename_
 
std::string dbFilename_
 
bool flagPrint_
 
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 > > mapTimeWeight_
 
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_
 
std::map< int, std::vector< unsigned int > > mapXtalToGroup_
 
std::map< int, std::vector< unsigned int > > mapXtalToLin_
 

Static Private Attributes

static const int maxSamplesUsed_ = 12
 
static const int nLinConst_ = 8
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
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::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Author
L. Lutton, N. Marinelli - Univ. of Notre Dame Description: forPhase II

Definition at line 47 of file EcalEBTrigPrimPhase2ESProducer.cc.

Constructor & Destructor Documentation

◆ EcalEBTrigPrimPhase2ESProducer()

EcalEBTrigPrimPhase2ESProducer::EcalEBTrigPrimPhase2ESProducer ( const edm::ParameterSet iConfig)

Definition at line 134 of file EcalEBTrigPrimPhase2ESProducer.cc.

References parseWeightsFile(), produceAmpWeight(), produceBadX(), produceLinearizationConst(), producePedestals(), produceTimeWeight(), produceWeightGroup(), and edm::ESProducer::setWhatProduced().

135  : dbFilename_(iConfig.getUntrackedParameter<std::string>("DatabaseFile", "")),
136  configFilename_(iConfig.getParameter<edm::FileInPath>("WeightTextFile")),
137  flagPrint_(iConfig.getParameter<bool>("WriteInFile")) {
139 
140  // the following lines are needed to tell the framework what
141  // data is being produced
148  // the following commented lines as a reminder for items which might need to be implemented for Phase2
149  //setWhatProduced(this, &EcalEBTrigPrimPhase2ESProducer::producePhysicsConst);
150  //setWhatProduced(this, &EcalEBTrigPrimPhase2ESProducer::produceBadStrip);
151  //setWhatProduced(this, &EcalEBTrigPrimPhase2ESProducer::produceBadTT);
152  //setWhatProduced(this, &EcalEBTrigPrimPhase2ESProducer::produceSpike);
153 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< EcalEBPhase2TPGAmplWeightIdMap > produceAmpWeight(const EcalEBPhase2TPGAmplWeightIdMapRcd &)
std::unique_ptr< EcalTPGWeightGroup > produceWeightGroup(const EcalTPGWeightGroupRcd &)
std::unique_ptr< EcalEBPhase2TPGTimeWeightIdMap > produceTimeWeight(const EcalEBPhase2TPGTimeWeightIdMapRcd &)
std::unique_ptr< EcalTPGCrystalStatus > produceBadX(const EcalTPGCrystalStatusRcd &)
std::unique_ptr< EcalEBPhase2TPGLinearizationConst > produceLinearizationConst(const EcalEBPhase2TPGLinearizationConstRcd &)
std::unique_ptr< EcalEBPhase2TPGPedestalsMap > producePedestals(const EcalEBPhase2TPGPedestalsRcd &)

◆ ~EcalEBTrigPrimPhase2ESProducer()

EcalEBTrigPrimPhase2ESProducer::~EcalEBTrigPrimPhase2ESProducer ( )
override

Definition at line 155 of file EcalEBTrigPrimPhase2ESProducer.cc.

155 {}

Member Function Documentation

◆ getRange()

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

This method is not used at all, however is a reminder that something alike will probably be needed once the mapping EB to BCPs will be in place.

Definition at line 687 of file EcalEBTrigPrimPhase2ESProducer.cc.

References FastTimerService_cff::range.

688  {
689  std::vector<int> range;
690  if (subdet == 0) {
691  // Barrel
692  range.push_back(37); // stccNbMin
693  range.push_back(73); // tccNbMax
694  range.push_back(1); // towerNbMin
695  range.push_back(69); // towerNbMax
696  range.push_back(1); // stripNbMin
697  range.push_back(6); // stripNbMax
698  range.push_back(1); // xtalNbMin
699  range.push_back(6); // xtalNbMax
700  }
701 
702  if (tccNb > 0) {
703  range[0] = tccNb;
704  range[1] = tccNb + 1;
705  }
706  if (towerNbInTcc > 0) {
707  range[2] = towerNbInTcc;
708  range[3] = towerNbInTcc + 1;
709  }
710  if (stripNbInTower > 0) {
711  range[4] = stripNbInTower;
712  range[5] = stripNbInTower + 1;
713  }
714  if (xtalNbInStrip > 0) {
715  range[6] = xtalNbInStrip;
716  range[7] = xtalNbInStrip + 1;
717  }
718 
719  return range;
720 }

◆ parseTextFile()

void EcalEBTrigPrimPhase2ESProducer::parseTextFile ( )
private

Definition at line 462 of file EcalEBTrigPrimPhase2ESProducer.cc.

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

Referenced by produceBadX(), and producePhysicsConst().

462  {
463  if (!mapXtal_.empty())
464  return; // just parse the file once!
465 
466  uint32_t id;
467  std::string dataCard;
469  std::ifstream infile;
470  std::vector<unsigned int> param;
471  std::vector<float> paramF;
472  int NBstripparams[2] = {4, 4};
473  unsigned int data;
474 
475  std::string bufString;
476  std::string iString;
477  std::string fString;
478  std::string filename = "SimCalorimetry/EcalTrigPrimProducers/data/" + dbFilename_;
479  std::string finalFileName;
480  size_t slash = dbFilename_.find('/');
481  if (slash != 0) {
482  edm::FileInPath fileInPath(filename);
483  finalFileName = fileInPath.fullPath();
484  } else {
485  finalFileName = dbFilename_;
486  edm::LogWarning("EcalTPG") << "Couldnt find database file via fileinpath, "
487  "trying with pathname directly!!";
488  }
489 
490  int k = 0;
491 
492  GzInputStream gis(finalFileName.c_str());
493  while (gis >> dataCard) {
494  if (dataCard == "CRYSTAL") {
495  gis >> std::dec >> id;
496 
497  std::string st3;
498  std::string st4;
499  std::string st5;
500 
501  if (flagPrint_) {
502  // Print this comment only one time
503  if (k == 0)
504  std::cout << "COMMENT ====== barrel crystals ====== " << std::endl;
505 
506  if (k == 61200)
507  std::cout << "COMMENT ====== endcap crystals ====== " << std::endl;
508 
509  k = k + 1;
510 
511  std::cout << dataCard << " " << std::dec << id << std::endl;
512  }
513 
514  param.clear();
515  for (int i = 0; i < 9; i++) {
516  gis >> std::hex >> data;
517  param.push_back(data);
518 
519  if (flagPrint_) {
520  if (i < 3) {
521  std::ostringstream oss;
522  oss << std::hex << data;
523  std::string result1 = oss.str();
524 
525  st3.append("0x");
526  st3.append(result1);
527  if (i != 2)
528  st3.append(" ");
529 
530  } else if (i > 2 && i < 6) {
531  std::ostringstream oss;
532  oss << std::hex << data;
533  std::string result2 = oss.str();
534 
535  st4.append("0x");
536  st4.append(result2);
537  if (i != 5)
538  st4.append(" ");
539  } else if (i > 5 && i < 9) {
540  std::ostringstream oss;
541  oss << std::hex << data;
542  std::string result3 = oss.str();
543 
544  st5.append("0x");
545  st5.append(result3);
546  if (i != 8)
547  st5.append(" ");
548  }
549  }
550 
551  } // end for
552 
553  if (flagPrint_) {
554  std::cout << " " << st3 << std::endl;
555  std::cout << " " << st4 << std::endl;
556  std::cout << " " << st5 << std::endl;
557  }
558 
559  mapXtal_[id] = param;
560  }
561 
562  if (dataCard == "STRIP_EB") {
563  gis >> std::dec >> id;
564 
565  std::string st1;
566 
567  if (flagPrint_)
568  std::cout << dataCard << " " << std::dec << id << std::endl;
569 
570  param.clear();
571  for (int i = 0; i < NBstripparams[0]; i++) {
572  gis >> std::hex >> data;
573  param.push_back(data);
574 
575  if (flagPrint_) {
576  if (i == 0) {
577  std::cout << "0x" << std::hex << data << std::endl;
578  } else if (i == 1) {
579  std::cout << "" << std::hex << data << std::endl;
580  } else if (i > 1) {
581  std::ostringstream oss;
582  if (i == 2) {
583  oss << "0x" << std::hex << data;
584  std::string result4 = oss.str();
585  st1.append(result4);
586  } else if (i == 3) {
587  std::ostringstream oss;
588  oss << " 0x" << std::hex << data;
589  std::string result5 = oss.str();
590 
591  st1.append(result5);
592  std::cout << "" << st1 << std::endl;
593  }
594  }
595  }
596  }
597 
598  mapStrip_[0][id] = param;
599  }
600 
601  if (dataCard == "STRIP_EE") {
602  gis >> std::dec >> id;
603 
604  std::string st6;
605 
606  if (flagPrint_) {
607  std::cout << dataCard << " " << std::dec << id << std::endl;
608  }
609 
610  param.clear();
611  for (int i = 0; i < NBstripparams[1]; i++) {
612  gis >> std::hex >> data;
613  param.push_back(data);
614 
615  if (flagPrint_) {
616  if (i == 0) {
617  std::cout << "0x" << std::hex << data << std::endl;
618  } else if (i == 1) {
619  std::cout << " " << std::hex << data << std::endl;
620  } else if (i > 1) {
621  std::ostringstream oss;
622  if (i == 2) {
623  oss << "0x" << std::hex << data;
624  std::string result4 = oss.str();
625  st6.append(result4);
626  } else if (i == 3) {
627  std::ostringstream oss;
628  oss << " 0x" << std::hex << data;
629  std::string result5 = oss.str();
630 
631  st6.append(result5);
632  std::cout << "" << st6 << std::endl;
633  }
634  }
635  }
636  }
637 
638  mapStrip_[1][id] = param;
639  }
640 
641  if (dataCard == "TOWER_EE") {
642  gis >> std::dec >> id;
643 
644  if (flagPrint_)
645  std::cout << dataCard << " " << std::dec << id << std::endl;
646 
647  param.clear();
648  for (int i = 0; i < 2; i++) {
649  gis >> std::hex >> data;
650  param.push_back(data);
651 
652  if (flagPrint_) {
653  if (i == 1) {
654  std::cout << "0x" << std::dec << data << std::endl;
655  } else {
656  std::cout << " " << std::dec << data << std::endl;
657  }
658  }
659  }
660 
661  mapTower_[1][id] = param;
662  }
663 
664  if (dataCard == "TOWER_EB") {
665  gis >> std::dec >> id;
666 
667  if (flagPrint_)
668  std::cout << dataCard << " " << std::dec << id << std::endl;
669 
670  param.clear();
671  for (int i = 0; i < 3; i++) {
672  gis >> std::dec >> data;
673 
674  if (flagPrint_) {
675  std::cout << " " << std::dec << data << std::endl;
676  }
677 
678  param.push_back(data);
679  }
680 
681  mapTower_[0][id] = param;
682  }
683  }
684 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
Log< level::Warning, false > LogWarning
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]

◆ parseWeightsFile()

void EcalEBTrigPrimPhase2ESProducer::parseWeightsFile ( )
private

debug

debug

Definition at line 302 of file EcalEBTrigPrimPhase2ESProducer.cc.

References configFilename_, gather_cfg::cout, data, TauDecayModes::dec, corrVsCorr::filename, flagPrint_, edm::FileInPath::fullPath(), mps_fire::i, l1ctLayer2EG_cff::id, mapTimeWeight_, mapWeight_, mapXtalToGroup_, mapXtalToLin_, maxSamplesUsed_, nLinConst_, pickleFileParser::slash, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalEBTrigPrimPhase2ESProducer().

302  {
303  uint32_t id;
304  std::string dataCard;
305  std::vector<unsigned int> param;
306 
307  int data;
309  ;
310  std::string finalFileName;
311  size_t slash = filename.find('/');
312  if (slash != 0) {
313  edm::FileInPath fileInPath(filename);
314  finalFileName = fileInPath.fullPath();
315  } else {
316  finalFileName = filename;
317  edm::LogWarning("EcalEBTPGESProducer")
318  << "Couldnt find database file via fileinpath trying with pathname directly!!";
319  }
320 
321  GzInputStream gis(finalFileName.c_str());
322  while (gis >> dataCard) {
323  if (dataCard == "WEIGHTAMP") {
324  gis >> std::dec >> id;
325 
326  if (flagPrint_) {
327  std::cout << dataCard << " " << std::dec << id << std::endl;
328  }
329 
330  param.clear();
331 
332  std::string st6;
333  for (int i = 0; i < maxSamplesUsed_; i++) {
334  gis >> std::hex >> data;
335  param.push_back(data);
337 
338  if (flagPrint_) {
339  std::ostringstream oss;
340  oss << std::hex << data;
341  std::string result4 = oss.str();
342 
343  st6.append("0x");
344  st6.append(result4);
345  st6.append(" ");
346  }
347  }
348 
349  // debug
350  if (flagPrint_) {
351  std::cout << st6 << std::endl;
352  std::cout << std::endl;
353  }
354 
355  // std::cout << " WEIGHTAMP id " << id << std::endl;
356  mapWeight_[id] = param;
357  }
358 
359  if (dataCard == "WEIGHTTIME") {
360  gis >> std::dec >> id;
361 
362  if (flagPrint_) {
363  std::cout << dataCard << " " << std::dec << id << std::endl;
364  }
365 
366  param.clear();
367 
368  std::string st6;
369  for (int i = 0; i < maxSamplesUsed_; i++) {
370  gis >> std::hex >> data;
371  //std::cout << " Parse time weight filling data " << data;
372  param.push_back(data);
374 
375  if (flagPrint_) {
376  std::ostringstream oss;
377  oss << std::hex << data;
378  std::string result4 = oss.str();
379 
380  st6.append("0x");
381  st6.append(result4);
382  st6.append(" ");
383  }
384  }
385 
386  // debug
387  if (flagPrint_) {
388  std::cout << st6 << std::endl;
389  std::cout << std::endl;
390  }
391  mapTimeWeight_[id] = param;
392  }
393 
394  if (dataCard == "CRYSTAL") {
395  gis >> std::dec >> id;
396 
397  if (flagPrint_) {
398  std::cout << dataCard << " " << std::dec << id << std::endl;
399  }
400 
401  param.clear();
402  std::string st6;
403  gis >> std::dec >> data;
404  param.push_back(data);
405 
406  if (flagPrint_) {
407  std::ostringstream oss;
408  oss << std::dec << data;
409  std::string result4 = oss.str();
410  st6.append(result4);
411  st6.append(" ");
412  std::cout << st6 << std::endl;
413  std::cout << std::endl;
414  }
415  mapXtalToGroup_[id] = param;
416  }
417 
418  if (dataCard == "LINCONST") {
419  gis >> std::dec >> id;
420 
421  if (flagPrint_) {
422  std::cout << dataCard << " " << std::dec << id << std::endl;
423  }
424 
425  param.clear();
426  std::string st6;
427  std::string st7;
428 
429  for (int i = 0; i < nLinConst_; i++) {
430  gis >> std::hex >> data;
431  param.push_back(data);
432 
433  if (flagPrint_) {
434  if (i < 4) {
435  std::ostringstream oss;
436  oss << std::hex << data;
437  std::string result6 = oss.str();
438  st6.append("0x");
439  st6.append(result6);
440  if (i != 3)
441  st6.append(" ");
442  } else if (i < 8) {
443  std::ostringstream oss;
444  oss << std::hex << data;
445  std::string result7 = oss.str();
446  st7.append("0x");
447  st7.append(result7);
448  if (i != 7)
449  st7.append(" ");
450  }
451  }
452  }
453  if (flagPrint_) {
454  std::cout << st6 << std::endl;
455  std::cout << st7 << std::endl;
456  }
457  mapXtalToLin_[id] = param;
458  }
459  }
460 }
std::map< uint32_t, std::vector< uint32_t > > mapTimeWeight_
std::string fullPath() const
Definition: FileInPath.cc:161
std::map< uint32_t, std::vector< uint32_t > > mapWeight_
std::map< int, std::vector< unsigned int > > mapXtalToGroup_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
Log< level::Warning, false > LogWarning
std::map< int, std::vector< unsigned int > > mapXtalToLin_

◆ produceAmpWeight()

std::unique_ptr< EcalEBPhase2TPGAmplWeightIdMap > EcalEBTrigPrimPhase2ESProducer::produceAmpWeight ( const EcalEBPhase2TPGAmplWeightIdMapRcd iRecord)

Definition at line 200 of file EcalEBTrigPrimPhase2ESProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mapWeight_, dumpMFGeometry_cfg::prod, and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.

Referenced by EcalEBTrigPrimPhase2ESProducer().

201  {
202  auto prod = std::make_unique<EcalEBPhase2TPGAmplWeightIdMap>();
203 
205  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
206  for (it = mapWeight_.begin(); it != mapWeight_.end(); it++) {
207  weights.setValues((it->second)[0],
208  (it->second)[1],
209  (it->second)[2],
210  (it->second)[3],
211  (it->second)[4],
212  (it->second)[5],
213  (it->second)[6],
214  (it->second)[7],
215  (it->second)[8],
216  (it->second)[9],
217  (it->second)[10],
218  (it->second)[11]);
219  prod->setValue(it->first, weights);
220  }
221 
222  return prod;
223 }
std::map< uint32_t, std::vector< uint32_t > > mapWeight_

◆ produceBadX()

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

Definition at line 288 of file EcalEBTrigPrimPhase2ESProducer.cc.

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

Referenced by EcalEBTrigPrimPhase2ESProducer().

289  {
290  auto prod = std::make_unique<EcalTPGCrystalStatus>();
291 
292  parseTextFile();
293  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
294  for (it = mapXtal_.begin(); it != mapXtal_.end(); it++) {
295  EcalTPGCrystalStatusCode badXValue;
296  badXValue.setStatusCode(0);
297  prod->setValue(it->first, badXValue);
298  }
299  return prod;
300 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
void setStatusCode(const uint16_t &val)

◆ produceLinearizationConst()

std::unique_ptr< EcalEBPhase2TPGLinearizationConst > EcalEBTrigPrimPhase2ESProducer::produceLinearizationConst ( const EcalEBPhase2TPGLinearizationConstRcd iRecord)

Definition at line 180 of file EcalEBTrigPrimPhase2ESProducer.cc.

References EcalEBPhase2TPGLinearizationConstant::i2cSub_x1, EcalEBPhase2TPGLinearizationConstant::i2cSub_x10, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mapXtalToLin_, EcalEBPhase2TPGLinearizationConstant::mult_x1, EcalEBPhase2TPGLinearizationConstant::mult_x10, dumpMFGeometry_cfg::prod, EcalEBPhase2TPGLinearizationConstant::shift_x1, and EcalEBPhase2TPGLinearizationConstant::shift_x10.

Referenced by EcalEBTrigPrimPhase2ESProducer().

181  {
182  auto prod = std::make_unique<EcalEBPhase2TPGLinearizationConst>();
183 
184  std::map<int, std::vector<unsigned int>>::const_iterator it;
185  for (it = mapXtalToLin_.begin(); it != mapXtalToLin_.end(); it++) {
187 
188  param.mult_x10 = (it->second)[1];
189  param.mult_x1 = (it->second)[5];
190  param.shift_x10 = (it->second)[2];
191  param.shift_x1 = (it->second)[6];
192  param.i2cSub_x10 = (it->second)[3];
193  param.i2cSub_x1 = (it->second)[7];
194  prod->setValue(it->first, param);
195  }
196 
197  return prod;
198 }
std::map< int, std::vector< unsigned int > > mapXtalToLin_

◆ producePedestals()

std::unique_ptr< EcalEBPhase2TPGPedestalsMap > EcalEBTrigPrimPhase2ESProducer::producePedestals ( const EcalEBPhase2TPGPedestalsRcd iRecord)

Definition at line 163 of file EcalEBTrigPrimPhase2ESProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mapXtalToLin_, EcalEBPhase2TPGPedestal::mean_x1, EcalEBPhase2TPGPedestal::mean_x10, and dumpMFGeometry_cfg::prod.

Referenced by EcalEBTrigPrimPhase2ESProducer().

164  {
165  auto prod = std::make_unique<EcalEBPhase2TPGPedestalsMap>();
166 
167  std::map<int, std::vector<unsigned int>>::const_iterator it;
168  for (it = mapXtalToLin_.begin(); it != mapXtalToLin_.end(); it++) {
169  EBDetId myEBDetId = EBDetId(it->first);
171 
172  ped.mean_x10 = (it->second)[0];
173  ped.mean_x1 = (it->second)[3];
174  prod->insert(std::make_pair(myEBDetId, ped));
175  }
176 
177  return prod;
178 }
std::map< int, std::vector< unsigned int > > mapXtalToLin_

◆ producePhysicsConst()

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

Definition at line 266 of file EcalEBTrigPrimPhase2ESProducer.cc.

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

267  {
268  auto prod = std::make_unique<EcalTPGPhysicsConst>();
269  // EcalEBTrigPrimPhase2ESProducer::producePhysicsConst Needs updating if we want to keep it
270 
271  parseTextFile();
272  std::map<uint32_t, std::vector<float>>::const_iterator it;
273  for (it = mapPhys_.begin(); it != mapPhys_.end(); it++) {
275  item.EtSat = (it->second)[0];
276  item.ttf_threshold_Low = (it->second)[1];
277  item.ttf_threshold_High = (it->second)[2];
278  item.FG_lowThreshold = (it->second)[3];
279  item.FG_highThreshold = (it->second)[4];
280  item.FG_lowRatio = (it->second)[5];
281  item.FG_highRatio = (it->second)[6];
282  prod->setValue(it->first, item);
283  }
284 
285  return prod;
286 }
std::map< uint32_t, std::vector< float > > mapPhys_

◆ produceTimeWeight()

std::unique_ptr< EcalEBPhase2TPGTimeWeightIdMap > EcalEBTrigPrimPhase2ESProducer::produceTimeWeight ( const EcalEBPhase2TPGTimeWeightIdMapRcd iRecord)

Definition at line 225 of file EcalEBTrigPrimPhase2ESProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mapTimeWeight_, and dumpMFGeometry_cfg::prod.

Referenced by EcalEBTrigPrimPhase2ESProducer().

226  {
227  auto prod = std::make_unique<EcalEBPhase2TPGTimeWeightIdMap>();
228 
229  EcalEBPhase2TPGTimeWeights weights_time;
230  std::map<uint32_t, std::vector<uint32_t>>::const_iterator it;
231  for (it = mapTimeWeight_.begin(); it != mapTimeWeight_.end(); it++) {
232  weights_time.setValues((it->second)[0],
233  (it->second)[1],
234  (it->second)[2],
235  (it->second)[3],
236  (it->second)[4],
237  (it->second)[5],
238  (it->second)[6],
239  (it->second)[7],
240  (it->second)[8],
241  (it->second)[9],
242  (it->second)[10],
243  (it->second)[11]);
244  prod->setValue(it->first, weights_time);
245  }
246 
247  return prod;
248 }
std::map< uint32_t, std::vector< uint32_t > > mapTimeWeight_

◆ produceWeightGroup()

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

Definition at line 250 of file EcalEBTrigPrimPhase2ESProducer.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mapXtalToGroup_, and dumpMFGeometry_cfg::prod.

Referenced by EcalEBTrigPrimPhase2ESProducer().

251  {
252  auto prod = std::make_unique<EcalTPGWeightGroup>();
253 
254  const int NGROUPS = 61200;
255 
256  for (int iGroup = 0; iGroup < NGROUPS; iGroup++) {
257  std::map<int, std::vector<unsigned int>>::const_iterator it;
258  for (it = mapXtalToGroup_.begin(); it != mapXtalToGroup_.end(); it++) {
259  prod->setValue(it->first, it->second[0]);
260  }
261  }
262 
263  return prod;
264 }
std::map< int, std::vector< unsigned int > > mapXtalToGroup_

Member Data Documentation

◆ configFilename_

const edm::FileInPath EcalEBTrigPrimPhase2ESProducer::configFilename_
private

Definition at line 75 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile().

◆ dbFilename_

std::string EcalEBTrigPrimPhase2ESProducer::dbFilename_
private

Definition at line 73 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseTextFile().

◆ flagPrint_

bool EcalEBTrigPrimPhase2ESProducer::flagPrint_
private

Definition at line 76 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseTextFile(), and parseWeightsFile().

◆ mapPhys_

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

Definition at line 84 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by producePhysicsConst().

◆ mapStrip_

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

Definition at line 78 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseTextFile().

◆ mapTimeWeight_

std::map<uint32_t, std::vector<uint32_t> > EcalEBTrigPrimPhase2ESProducer::mapTimeWeight_
private

Definition at line 81 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile(), and produceTimeWeight().

◆ mapTower_

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

Definition at line 79 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseTextFile().

◆ mapWeight_

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

Definition at line 80 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile(), and produceAmpWeight().

◆ mapXtal_

std::map<uint32_t, std::vector<uint32_t> > EcalEBTrigPrimPhase2ESProducer::mapXtal_
private

Definition at line 77 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseTextFile(), and produceBadX().

◆ mapXtalToGroup_

std::map<int, std::vector<unsigned int> > EcalEBTrigPrimPhase2ESProducer::mapXtalToGroup_
private

Definition at line 82 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile(), and produceWeightGroup().

◆ mapXtalToLin_

std::map<int, std::vector<unsigned int> > EcalEBTrigPrimPhase2ESProducer::mapXtalToLin_
private

◆ maxSamplesUsed_

const int EcalEBTrigPrimPhase2ESProducer::maxSamplesUsed_ = 12
staticprivate

Definition at line 85 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile().

◆ nLinConst_

const int EcalEBTrigPrimPhase2ESProducer::nLinConst_ = 8
staticprivate

Definition at line 86 of file EcalEBTrigPrimPhase2ESProducer.cc.

Referenced by parseWeightsFile().