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 ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
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

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 50 of file EcalTrigPrimESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 63 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().

63  :
64  dbFilename_(iConfig.getUntrackedParameter<std::string>("DatabaseFile","")),
65  flagPrint_(iConfig.getParameter<bool>("WriteInFile"))
66 {
67  //the following line is needed to tell the framework what
68  // data is being produced
85  //now do what ever other initialization is needed
86 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< EcalTPGWeightGroup > produceWeightGroup(const EcalTPGWeightGroupRcd &)
std::unique_ptr< EcalTPGCrystalStatus > produceBadX(const EcalTPGCrystalStatusRcd &)
std::unique_ptr< EcalTPGLinearizationConst > produceLinearizationConst(const EcalTPGLinearizationConstRcd &)
std::unique_ptr< EcalTPGFineGrainEBIdMap > produceFineGrainEB(const EcalTPGFineGrainEBIdMapRcd &)
std::unique_ptr< EcalTPGLutIdMap > produceLUT(const EcalTPGLutIdMapRcd &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::unique_ptr< EcalTPGTowerStatus > produceBadTT(const EcalTPGTowerStatusRcd &)
std::unique_ptr< EcalTPGPedestals > producePedestals(const EcalTPGPedestalsRcd &)
std::unique_ptr< EcalTPGPhysicsConst > producePhysicsConst(const EcalTPGPhysicsConstRcd &)
std::unique_ptr< EcalTPGFineGrainTowerEE > produceFineGrainEEtower(const EcalTPGFineGrainTowerEERcd &)
std::unique_ptr< EcalTPGSpike > produceSpike(const EcalTPGSpikeRcd &)
std::unique_ptr< EcalTPGSlidingWindow > produceSlidingWindow(const EcalTPGSlidingWindowRcd &)
std::unique_ptr< EcalTPGFineGrainEBGroup > produceFineGrainEBGroup(const EcalTPGFineGrainEBGroupRcd &)
std::unique_ptr< EcalTPGLutGroup > produceLutGroup(const EcalTPGLutGroupRcd &)
std::unique_ptr< EcalTPGFineGrainStripEE > produceFineGrainEEstrip(const EcalTPGFineGrainStripEERcd &)
std::unique_ptr< EcalTPGWeightIdMap > produceWeight(const EcalTPGWeightIdMapRcd &)
std::unique_ptr< EcalTPGStripStatus > produceBadStrip(const EcalTPGStripStatusRcd &)
EcalTrigPrimESProducer::~EcalTrigPrimESProducer ( )

Definition at line 89 of file EcalTrigPrimESProducer.cc.

90 {
91 }

Member Function Documentation

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

Definition at line 722 of file EcalTrigPrimESProducer.cc.

723 {
724  std::vector<int> range ;
725  if (subdet == 0) {
726  // Barrel
727  range.push_back(37) ; // stccNbMin
728  range.push_back(73) ; // tccNbMax
729  range.push_back(1) ; // towerNbMin
730  range.push_back(69) ; // towerNbMax
731  range.push_back(1) ; // stripNbMin
732  range.push_back(6) ; // stripNbMax
733  range.push_back(1) ; // xtalNbMin
734  range.push_back(6) ; // xtalNbMax
735  } else {
736  // Endcap eta >0
737  if (subdet >0 ) {
738  range.push_back(73) ; // tccNbMin
739  range.push_back(109) ; // tccNbMax
740  } else { //endcap eta <0
741  range.push_back(1) ; // tccNbMin
742  range.push_back(37) ; // tccNbMax
743  }
744  range.push_back(1) ; // towerNbMin
745  range.push_back(29) ; // towerNbMax
746  range.push_back(1) ; // stripNbMin
747  range.push_back(6) ; // stripNbMax
748  range.push_back(1) ; // xtalNbMin
749  range.push_back(6) ; // xtalNbMax
750  }
751 
752  if (tccNb>0) {
753  range[0] = tccNb ;
754  range[1] = tccNb+1 ;
755  }
756  if (towerNbInTcc>0) {
757  range[2] = towerNbInTcc ;
758  range[3] = towerNbInTcc+1 ;
759  }
760  if (stripNbInTower>0) {
761  range[4] = stripNbInTower ;
762  range[5] = stripNbInTower+1 ;
763  }
764  if (xtalNbInStrip>0) {
765  range[6] = xtalNbInStrip ;
766  range[7] = xtalNbInStrip+1 ;
767  }
768 
769  return range ;
770 }
void EcalTrigPrimESProducer::parseTextFile ( )
private

Definition at line 335 of file EcalTrigPrimESProducer.cc.

References gather_cfg::cout, data, dbFilename_, TauDecayModes::dec, corrVsCorr::filename, flagPrint_, edm::FileInPath::fullPath(), mps_fire::i, hcalTTPDigis_cfi::id, gen::k, geometryCSVtoXML::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().

336 {
337  if (mapXtal_.size() != 0) return ; // just parse the file once!
338 
339  uint32_t id ;
340  std::string dataCard ;
342  std::ifstream infile ;
343  std::vector<unsigned int> param ;
344  std::vector<float> paramF ;
345  int NBstripparams[2] = {4, 4} ;
346  unsigned int data ;
347  float dataF ;
348 
349  std::string bufString;
350  std::string iString;
351  std::string fString;
352  std::string filename = "SimCalorimetry/EcalTrigPrimProducers/data/"+dbFilename_;
353  std::string finalFileName ;
354  size_t slash=dbFilename_.find("/");
355  if (slash!=0) {
356  edm::FileInPath fileInPath(filename);
357  finalFileName = fileInPath.fullPath() ;
358  }
359  else {
360  finalFileName = dbFilename_.c_str() ;
361  edm::LogWarning("EcalTPG") <<"Couldnt find database file via fileinpath, trying with pathname directly!!";
362  }
363 
364 
365  int k=0;
366 
367  GzInputStream gis(finalFileName.c_str()) ;
368  while (gis>>dataCard) {
369 
370  if (dataCard == "PHYSICS_EB" || dataCard == "PHYSICS_EE") {
371  gis>>std::dec>>id ;
372 
373  if (flagPrint_){
374  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
375  }
376 
377  paramF.clear() ;
378 
379  std::string st1;
380  std::string st2;
381 
382  for (int i=0 ; i <7 ; i++) {
383  gis>>std::dec>>dataF ;
384  paramF.push_back(dataF) ;
385 
386  //std::cout<<", "<<std::dec<<dataF ;
387  if (flagPrint_){
388  //---------------------------------
389  if (i < 3){
390  std::ostringstream oss;
391  oss << dataF;
392  std::string result1 = oss.str();
393 
394  st1.append(result1);
395  if (i != 2)
396  st1.append(" ");
397  }
398 
399  if (i > 2){
400  std::ostringstream oss;
401  oss << dataF;
402  std::string result2 = oss.str();
403 
404  st2.append(result2);
405  if (i != 6)
406  st2.append(" ");
407  }
408  //----------------------------------
409  }
410  }
411 
412  if (flagPrint_){
413  std::cout << "" << st1 << std::endl;
414  std::cout << "" << st2 << std::endl;
415  std::cout << ""<< std::endl;
416  }
417 
418  //std::cout<<std::endl ;
419  mapPhys_[id] = paramF ;
420  }
421 
422  if (dataCard == "CRYSTAL") {
423 
424  gis>>std::dec>>id ;
425  //std::cout<<dataCard<<" "<<std::dec<<id;
426  std::string st3;
427  std::string st4;
428  std::string st5;
429 
430  if(flagPrint_){
431  //Print this comment only one time
432  if(k==0)
433  std::cout << "COMMENT ====== barrel crystals ====== " <<std::endl;
434 
435  if (k==61200)
436  std::cout << "COMMENT ====== endcap crystals ====== " <<std::endl;
437 
438  k=k+1;
439 
440  std::cout<<dataCard<<" "<<std::dec<<id << std::endl;
441  }
442 
443  param.clear() ;
444  for (int i=0 ; i <9 ; i++) {
445  gis>>std::hex>>data ;
446  //std::cout<<", "<<std::hex<<data ;
447  param.push_back(data);
448 
449  if(flagPrint_){
450  if (i<3){
451  std::ostringstream oss;
452  oss << std::hex<< data;
453  std::string result1 = oss.str();
454 
455  st3.append("0x");
456  st3.append(result1);
457  if (i !=2)
458  st3.append(" ");
459 
460  }else if(i>2 && i<6){
461  std::ostringstream oss;
462  oss << std::hex << data;
463  std::string result2 = oss.str();
464 
465  st4.append("0x");
466  st4.append(result2);
467  if (i != 5)
468  st4.append(" ");
469  }else if(i>5 && i<9){
470  std::ostringstream oss;
471  oss << std::hex<< data;
472  std::string result3 = oss.str();
473 
474  st5.append("0x");
475  st5.append(result3);
476  if (i != 8)
477  st5.append(" ");
478  }
479  }
480 
481  }//end for
482 
483  if(flagPrint_){
484  std::cout << " " << st3 << std::endl;
485  std::cout << " " << st4 << std::endl;
486  std::cout << " " << st5 << std::endl;
487  }
488 
489  //std::cout<<std::endl ;
490  mapXtal_[id] = param ;
491  }
492 
493  if (dataCard == "STRIP_EB") {
494  gis>>std::dec>>id ;
495 
496  std::string st1;
497 
498  if(flagPrint_)
499  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
500 
501  param.clear() ;
502  for (int i=0 ; i <NBstripparams[0] ; i++) {
503  gis>>std::hex>>data ;
504  //std::cout << " data = " << data << std::endl;
505  param.push_back(data);
506 
507  if(flagPrint_){
508  if (i==0){
509  std::cout<<"0x"<<std::hex<< data << std::endl;
510  }
511  else if (i==1){
512  std::cout<<""<<std::hex<< data << std::endl;
513  }
514  else if (i>1){
515  std::ostringstream oss;
516  if (i==2){
517  oss<<"0x"<<std::hex<<data;
518  std::string result4 = oss.str();
519  st1.append(result4);
520  }else if(i==3){
521  std::ostringstream oss;
522  oss<<" 0x"<<std::hex<<data;
523  std::string result5 = oss.str();
524 
525  st1.append(result5);
526  std::cout<< "" << st1 << std::endl;
527  }
528  }
529  }
530  }
531 
532  //std::cout<<std::endl ;
533  mapStrip_[0][id] = param ;
534  }
535 
536  if (dataCard == "STRIP_EE") {
537  gis>>std::dec>>id ;
538 
539  std::string st6;
540 
541  if(flagPrint_){
542  std::cout<<dataCard<<" "<<std::dec<<id << std::endl;
543  }
544 
545  param.clear() ;
546  for (int i=0 ; i <NBstripparams[1] ; i++) {
547  gis>>std::hex>>data ;
548  param.push_back(data);
549 
550  if(flagPrint_){
551  if (i==0){
552  std::cout<<"0x"<<std::hex<<data << std::endl;
553  }else if (i==1){
554  std::cout<<" "<<std::hex<<data<< std::endl;
555  }else if (i>1){
556  std::ostringstream oss;
557  if (i==2){
558  oss<<"0x"<<std::hex<<data;
559  std::string result4 = oss.str();
560  st6.append(result4);
561  }else if(i==3){
562  std::ostringstream oss;
563  oss<<" 0x"<<std::hex<<data;
564  std::string result5 = oss.str();
565 
566  st6.append(result5);
567  std::cout<< "" << st6 << std::endl;
568  }
569  }
570  }
571  }
572 
573  //std::cout<<std::endl ;
574  mapStrip_[1][id] = param ;
575  }
576 
577  if(dataCard == "TOWER_EE"){
578  gis>>std::dec>>id ;
579 
580  if(flagPrint_)
581  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
582 
583  param.clear() ;
584  for (int i=0 ; i <2 ; i++) {
585  gis>>std::hex>>data ;
586  param.push_back(data);
587 
588  if(flagPrint_){
589  if(i==1){
590  std::cout << "0x" <<std::dec<<data << std::endl;
591  }else{
592  std::cout << " " <<std::dec<<data << std::endl;
593  }
594  }
595  }
596 
597  //std::cout<<std::endl ;
598  mapTower_[1][id] = param ;
599  }
600 
601  if (dataCard == "TOWER_EB") {
602  gis>>std::dec>>id ;
603 
604  if(flagPrint_)
605  std::cout<<dataCard<<" "<<std::dec<<id << std::endl;
606 
607  param.clear() ;
608  for (int i=0 ; i <3 ; i++) {
609  gis>>std::dec>>data ;
610 
611  if(flagPrint_){
612  std::cout << " " << std::dec << data << std::endl;
613  }
614 
615  param.push_back(data) ;
616  }
617 
618  //std::cout<<std::endl ;
619  mapTower_[0][id] = param ;
620  }
621 
622  if (dataCard == "WEIGHT") {
623 
624  if(flagPrint_)
625  std::cout<<std::endl;
626 
627  gis>>std::hex>>id ;
628  if(flagPrint_){
629  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
630  }
631 
632  param.clear() ;
633 
634  std::string st6;
635  for (int i=0 ; i <5 ; i++) {
636  gis>>std::hex>>data ;
637  param.push_back(data);
638 
639  if(flagPrint_){
640  std::ostringstream oss;
641  oss << std::hex<< data;
642  std::string result4 = oss.str();
643 
644  st6.append("0x");
645  st6.append(result4);
646  st6.append(" ");
647  }
648 
649  }
650 
651  if(flagPrint_){
652  std::cout << st6 << std::endl;
653  std::cout<<std::endl;
654  }
655 
656  //std::cout<<std::endl ;
657  mapWeight_[id] = param ;
658  }
659 
660  if (dataCard == "FG") {
661 
662  if(flagPrint_)
663  std::cout <<std::endl;
664 
665  gis>>std::hex>>id ;
666  if(flagPrint_)
667  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
668 
669  param.clear() ;
670  std::string st7;
671  for (int i=0 ; i <5 ; i++) {
672  gis>>std::hex>>data ;
673  param.push_back(data);
674 
675  if(flagPrint_){
676  std::ostringstream oss;
677  oss << std::hex<< data;
678 
679  std::string result5 = oss.str();
680 
681  st7.append("0x");
682  st7.append(result5);
683  if (i != 4)
684  st7.append(" ");
685  }
686  }
687 
688  if(flagPrint_){
689  std::cout << st7 << std::endl;
690  std::cout<<std::endl ;
691  }
692 
693  mapFg_[id] = param ;
694  }
695 
696  if (dataCard == "LUT") {
697  gis>>std::hex>>id ;
698 
699  if(flagPrint_)
700  std::cout<<dataCard<<" "<<std::dec<<id <<std::endl;
701 
702  param.clear() ;
703  for (int i=0 ; i <1024 ; i++) {
704  gis>>std::hex>>data ;
705  param.push_back(data);
706 
707  if(flagPrint_){
708  std::cout<<"0x"<<std::hex<<data <<std::endl;
709  }
710  }
711 
712  if(flagPrint_) {
713  std::cout<<std::endl ;
714  std::cout<<std::endl ;
715  }
716 
717  mapLut_[id] = param ;
718  }
719  }
720 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
int k[5][pyjets_maxn]
std::map< uint32_t, std::vector< uint32_t > > mapWeight_
std::map< uint32_t, std::vector< uint32_t > > mapFg_
std::map< uint32_t, std::vector< float > > mapPhys_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::map< uint32_t, std::vector< uint32_t > > mapLut_
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::unique_ptr< EcalTPGStripStatus > EcalTrigPrimESProducer::produceBadStrip ( const EcalTPGStripStatusRcd iRecord)

Definition at line 295 of file EcalTrigPrimESProducer.cc.

References eostools::move(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

296 {
297  auto prod = std::make_unique<EcalTPGStripStatus>();
298  // returns an empty map
299  return std::move(prod);
300 
301 }
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGTowerStatus > EcalTrigPrimESProducer::produceBadTT ( const EcalTPGTowerStatusRcd iRecord)

Definition at line 303 of file EcalTrigPrimESProducer.cc.

References begin, mapTower_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

304 {
305  auto prod = std::make_unique<EcalTPGTowerStatus>();
306  parseTextFile() ;
307  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
308  //Barrel
309  for (it = mapTower_[0].begin() ; it != mapTower_[0].end() ; it++) {
310  //set the BadTT status to 0
311  prod->setValue(it->first,0) ;
312  }
313  //Endcap
314  for (it = mapTower_[1].begin() ; it != mapTower_[1].end() ; it++) {
315  //set the BadTT status to 0
316  prod->setValue(it->first,0) ;
317  }
318 
319  return std::move(prod);
320 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGCrystalStatus > EcalTrigPrimESProducer::produceBadX ( const EcalTPGCrystalStatusRcd iRecord)

Definition at line 280 of file EcalTrigPrimESProducer.cc.

References mapXtal_, eostools::move(), parseTextFile(), parseEventContent::prod, and EcalTPGCrystalStatusCode::setStatusCode().

Referenced by EcalTrigPrimESProducer().

281 {
282  auto prod = std::make_unique<EcalTPGCrystalStatus>();
283  parseTextFile() ;
284  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
285  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
286 
287  EcalTPGCrystalStatusCode badXValue;
288  badXValue.setStatusCode(0);
289  prod->setValue(it->first,badXValue) ;
290  }
291  return std::move(prod);
292 
293 }
void setStatusCode(const uint16_t &val)
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGFineGrainEBIdMap > EcalTrigPrimESProducer::produceFineGrainEB ( const EcalTPGFineGrainEBIdMapRcd iRecord)

Definition at line 146 of file EcalTrigPrimESProducer.cc.

References mapFg_, eostools::move(), parseTextFile(), parseEventContent::prod, and EcalTPGFineGrainConstEB::setValues().

Referenced by EcalTrigPrimESProducer().

147 {
148  auto prod = std::make_unique<EcalTPGFineGrainEBIdMap>();
149  parseTextFile() ;
151  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
152  for (it = mapFg_.begin() ; it != mapFg_.end() ; it++) {
153  fg.setValues((it->second)[0], (it->second)[1], (it->second)[2], (it->second)[3], (it->second)[4]) ;
154  prod->setValue(it->first,fg) ;
155  }
156  return std::move(prod);
157 }
void setValues(const uint32_t &ThresholdETLow, const uint32_t &ThresholdETHigh, const uint32_t &RatioLow, const uint32_t &RatioHigh, const uint32_t &LUT)
std::map< uint32_t, std::vector< uint32_t > > mapFg_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGFineGrainEBGroup > EcalTrigPrimESProducer::produceFineGrainEBGroup ( const EcalTPGFineGrainEBGroupRcd iRecord)

Definition at line 250 of file EcalTrigPrimESProducer.cc.

References begin, mapTower_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

251 {
252  auto prod = std::make_unique<EcalTPGFineGrainEBGroup>();
253  parseTextFile() ;
254  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
255  for (it = mapTower_[0].begin() ; it != mapTower_[0].end() ; it++) {
256  prod->setValue(it->first,(it->second)[1]) ;
257  }
258  return std::move(prod);
259 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGFineGrainStripEE > EcalTrigPrimESProducer::produceFineGrainEEstrip ( const EcalTPGFineGrainStripEERcd iRecord)

Definition at line 159 of file EcalTrigPrimESProducer.cc.

References begin, EcalTPGFineGrainStripEE::Item::lut, mapStrip_, eostools::move(), parseTextFile(), parseEventContent::prod, and EcalTPGFineGrainStripEE::Item::threshold.

Referenced by EcalTrigPrimESProducer().

160 {
161  auto prod = std::make_unique<EcalTPGFineGrainStripEE>();
162  parseTextFile() ;
163  // EE Strips
164  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
165  for (it = mapStrip_[1].begin() ; it != mapStrip_[1].end() ; it++) {
167  item.threshold = (it->second)[2] ;
168  item.lut = (it->second)[3] ;
169  prod->setValue(it->first,item) ;
170  }
171  // EB Strips
172  for (it = mapStrip_[0].begin() ; it != mapStrip_[0].end() ; it++) {
174  item.threshold = (it->second)[2] ;
175  item.lut = (it->second)[3] ;
176  prod->setValue(it->first,item) ;
177  }
178  return std::move(prod);
179 }
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::unique_ptr< EcalTPGFineGrainTowerEE > EcalTrigPrimESProducer::produceFineGrainEEtower ( const EcalTPGFineGrainTowerEERcd iRecord)

Definition at line 181 of file EcalTrigPrimESProducer.cc.

References begin, mapTower_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

182 {
183  auto prod = std::make_unique<EcalTPGFineGrainTowerEE>();
184  parseTextFile() ;
185  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
186  for (it = mapTower_[1].begin() ; it != mapTower_[1].end() ; it++) {
187  prod->setValue(it->first,(it->second)[1]) ;
188  }
189  return std::move(prod);
190 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGLinearizationConst > EcalTrigPrimESProducer::produceLinearizationConst ( const EcalTPGLinearizationConstRcd iRecord)

Definition at line 115 of file EcalTrigPrimESProducer.cc.

References mapXtal_, eostools::move(), EcalTPGLinearizationConstant::mult_x1, EcalTPGLinearizationConstant::mult_x12, EcalTPGLinearizationConstant::mult_x6, parseTextFile(), parseEventContent::prod, EcalTPGLinearizationConstant::shift_x1, EcalTPGLinearizationConstant::shift_x12, and EcalTPGLinearizationConstant::shift_x6.

Referenced by EcalTrigPrimESProducer().

116 {
117  auto prod = std::make_unique<EcalTPGLinearizationConst>();
118  parseTextFile() ;
119  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
120  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
122  item.mult_x12 = (it->second)[1] ;
123  item.mult_x6 = (it->second)[4] ;
124  item.mult_x1 = (it->second)[7] ;
125  item.shift_x12 = (it->second)[2] ;
126  item.shift_x6 = (it->second)[5] ;
127  item.shift_x1 = (it->second)[8] ;
128  prod->setValue(it->first,item) ;
129  }
130  return std::move(prod);
131 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGLutIdMap > EcalTrigPrimESProducer::produceLUT ( const EcalTPGLutIdMapRcd iRecord)

Definition at line 192 of file EcalTrigPrimESProducer.cc.

References mps_fire::i, lumiPlot::lut, mapLut_, eostools::move(), parseTextFile(), parseEventContent::prod, and EcalTPGLut::setLut().

Referenced by EcalTrigPrimESProducer().

193 {
194  auto prod = std::make_unique<EcalTPGLutIdMap>();
195  parseTextFile() ;
196  EcalTPGLut lut ;
197  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
198  for (it = mapLut_.begin() ; it != mapLut_.end() ; it++) {
199  unsigned int lutArray[1024] ;
200  for (int i=0 ; i <1024 ; i++) lutArray[i] = (it->second)[i] ;
201  lut.setLut(lutArray) ;
202  prod->setValue(it->first,lut) ;
203  }
204  return std::move(prod);
205 }
void setLut(const unsigned int *lut)
Definition: EcalTPGLut.cc:20
std::map< uint32_t, std::vector< uint32_t > > mapLut_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGLutGroup > EcalTrigPrimESProducer::produceLutGroup ( const EcalTPGLutGroupRcd iRecord)

Definition at line 237 of file EcalTrigPrimESProducer.cc.

References begin, mapTower_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

238 {
239  auto prod = std::make_unique<EcalTPGLutGroup>();
240  parseTextFile() ;
241  for (int subdet=0 ; subdet<2 ; subdet++) {
242  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
243  for (it = mapTower_[subdet].begin() ; it != mapTower_[subdet].end() ; it++) {
244  prod->setValue(it->first,(it->second)[0]) ;
245  }
246  }
247  return std::move(prod);
248 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGPedestals > EcalTrigPrimESProducer::producePedestals ( const EcalTPGPedestalsRcd iRecord)

Definition at line 100 of file EcalTrigPrimESProducer.cc.

References mapXtal_, EcalTPGPedestal::mean_x1, EcalTPGPedestal::mean_x12, EcalTPGPedestal::mean_x6, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

101 {
102  auto prod = std::make_unique<EcalTPGPedestals>();
103  parseTextFile() ;
104  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
105  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
106  EcalTPGPedestal item ;
107  item.mean_x12 = (it->second)[0] ;
108  item.mean_x6 = (it->second)[3] ;
109  item.mean_x1 = (it->second)[6] ;
110  prod->setValue(it->first,item) ;
111  }
112  return std::move(prod);
113 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGPhysicsConst > EcalTrigPrimESProducer::producePhysicsConst ( const EcalTPGPhysicsConstRcd iRecord)

Definition at line 261 of file EcalTrigPrimESProducer.cc.

References EcalTPGPhysicsConst::Item::EtSat, EcalTPGPhysicsConst::Item::FG_highRatio, EcalTPGPhysicsConst::Item::FG_highThreshold, EcalTPGPhysicsConst::Item::FG_lowRatio, EcalTPGPhysicsConst::Item::FG_lowThreshold, mapPhys_, eostools::move(), parseTextFile(), parseEventContent::prod, EcalTPGPhysicsConst::Item::ttf_threshold_High, and EcalTPGPhysicsConst::Item::ttf_threshold_Low.

Referenced by EcalTrigPrimESProducer().

262 {
263  auto prod = std::make_unique<EcalTPGPhysicsConst>();
264  parseTextFile() ;
265  std::map<uint32_t, std::vector<float> >::const_iterator it ;
266  for (it = mapPhys_.begin() ; it != mapPhys_.end() ; it++) {
268  item.EtSat = (it->second)[0] ;
269  item.ttf_threshold_Low = (it->second)[1] ;
270  item.ttf_threshold_High = (it->second)[2] ;
271  item.FG_lowThreshold = (it->second)[3] ;
272  item.FG_highThreshold = (it->second)[4] ;
273  item.FG_lowRatio = (it->second)[5] ;
274  item.FG_highRatio = (it->second)[6] ;
275  prod->setValue(it->first,item) ;
276  }
277  return std::move(prod);
278 }
std::map< uint32_t, std::vector< float > > mapPhys_
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGSlidingWindow > EcalTrigPrimESProducer::produceSlidingWindow ( const EcalTPGSlidingWindowRcd iRecord)

Definition at line 133 of file EcalTrigPrimESProducer.cc.

References begin, mapStrip_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

134 {
135  auto prod = std::make_unique<EcalTPGSlidingWindow>();
136  parseTextFile() ;
137  for (int subdet=0 ; subdet<2 ; subdet++) {
138  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
139  for (it = mapStrip_[subdet].begin() ; it != mapStrip_[subdet].end() ; it++) {
140  prod->setValue(it->first,(it->second)[0]) ;
141  }
142  }
143  return std::move(prod);
144 }
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::unique_ptr< EcalTPGSpike > EcalTrigPrimESProducer::produceSpike ( const EcalTPGSpikeRcd iRecord)

Definition at line 322 of file EcalTrigPrimESProducer.cc.

References begin, mapTower_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

323 {
324  auto prod = std::make_unique<EcalTPGSpike>();
325  parseTextFile();
326  // Only need to do barrel
327  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it;
328  for(it = mapTower_[0].begin(); it != mapTower_[0].end(); ++it)
329  {
330  prod->setValue(it->first, (it->second)[2]);
331  }
332  return std::move(prod);
333 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGWeightIdMap > EcalTrigPrimESProducer::produceWeight ( const EcalTPGWeightIdMapRcd iRecord)

Definition at line 207 of file EcalTrigPrimESProducer.cc.

References mapWeight_, eostools::move(), parseTextFile(), parseEventContent::prod, EcalTPGWeights::setValues(), and create_public_lumi_plots::weights.

Referenced by EcalTrigPrimESProducer().

208 {
209  auto prod = std::make_unique<EcalTPGWeightIdMap>();
210  parseTextFile() ;
212  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
213  for (it = mapWeight_.begin() ; it != mapWeight_.end() ; it++) {
214  weights.setValues((it->second)[0],
215  (it->second)[1],
216  (it->second)[2],
217  (it->second)[3],
218  (it->second)[4]) ;
219  prod->setValue(it->first,weights) ;
220  }
221  return std::move(prod);
222 }
std::map< uint32_t, std::vector< uint32_t > > mapWeight_
void setValues(const uint32_t &w0, const uint32_t &w1, const uint32_t &w2, const uint32_t &w3, const uint32_t &w4)
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< EcalTPGWeightGroup > EcalTrigPrimESProducer::produceWeightGroup ( const EcalTPGWeightGroupRcd iRecord)

Definition at line 224 of file EcalTrigPrimESProducer.cc.

References begin, mapStrip_, eostools::move(), parseTextFile(), and parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

225 {
226  auto prod = std::make_unique<EcalTPGWeightGroup>();
227  parseTextFile() ;
228  for (int subdet=0 ; subdet<2 ; subdet++) {
229  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
230  for (it = mapStrip_[subdet].begin() ; it != mapStrip_[subdet].end() ; it++) {
231  prod->setValue(it->first,(it->second)[1]) ;
232  }
233  }
234  return std::move(prod);
235 }
#define begin
Definition: vmac.h:30
def move(src, dest)
Definition: eostools.py:510
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]

Member Data Documentation

std::string EcalTrigPrimESProducer::dbFilename_
private

Definition at line 78 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile().

bool EcalTrigPrimESProducer::flagPrint_
private

Definition at line 79 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile().

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

Definition at line 84 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceFineGrainEB().

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

Definition at line 85 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceLUT().

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

Definition at line 86 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and producePhysicsConst().

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

Definition at line 83 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceWeight().

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