CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr< EcalTPGStripStatusproduceBadStrip (const EcalTPGStripStatusRcd &)
 
std::auto_ptr< EcalTPGTowerStatusproduceBadTT (const EcalTPGTowerStatusRcd &)
 
std::auto_ptr
< EcalTPGCrystalStatus
produceBadX (const EcalTPGCrystalStatusRcd &)
 
std::auto_ptr
< EcalTPGFineGrainEBIdMap
produceFineGrainEB (const EcalTPGFineGrainEBIdMapRcd &)
 
std::auto_ptr
< EcalTPGFineGrainEBGroup
produceFineGrainEBGroup (const EcalTPGFineGrainEBGroupRcd &)
 
std::auto_ptr
< EcalTPGFineGrainStripEE
produceFineGrainEEstrip (const EcalTPGFineGrainStripEERcd &)
 
std::auto_ptr
< EcalTPGFineGrainTowerEE
produceFineGrainEEtower (const EcalTPGFineGrainTowerEERcd &)
 
std::auto_ptr
< EcalTPGLinearizationConst
produceLinearizationConst (const EcalTPGLinearizationConstRcd &)
 
std::auto_ptr< EcalTPGLutIdMapproduceLUT (const EcalTPGLutIdMapRcd &)
 
std::auto_ptr< EcalTPGLutGroupproduceLutGroup (const EcalTPGLutGroupRcd &)
 
std::auto_ptr< EcalTPGPedestalsproducePedestals (const EcalTPGPedestalsRcd &)
 
std::auto_ptr
< EcalTPGPhysicsConst
producePhysicsConst (const EcalTPGPhysicsConstRcd &)
 
std::auto_ptr
< EcalTPGSlidingWindow
produceSlidingWindow (const EcalTPGSlidingWindowRcd &)
 
std::auto_ptr< EcalTPGSpikeproduceSpike (const EcalTPGSpikeRcd &)
 
std::auto_ptr< EcalTPGWeightIdMapproduceWeight (const EcalTPGWeightIdMapRcd &)
 
std::auto_ptr< EcalTPGWeightGroupproduceWeightGroup (const EcalTPGWeightGroupRcd &)
 
 ~EcalTrigPrimESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

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, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_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 61 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().

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

Definition at line 87 of file EcalTrigPrimESProducer.cc.

88 {
89 }

Member Function Documentation

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

Definition at line 719 of file EcalTrigPrimESProducer.cc.

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

Definition at line 333 of file EcalTrigPrimESProducer.cc.

References gather_cfg::cout, data, dbFilename_, lut2db_cfg::filename, flagPrint_, edm::FileInPath::fullPath(), i, getDQMSummary::infile, 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().

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

Definition at line 293 of file EcalTrigPrimESProducer.cc.

References parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

294 {
295  std::auto_ptr<EcalTPGStripStatus> prod(new EcalTPGStripStatus());
296  // returns an empty map
297  return prod;
298 
299 }
std::auto_ptr< EcalTPGTowerStatus > EcalTrigPrimESProducer::produceBadTT ( const EcalTPGTowerStatusRcd iRecord)

Definition at line 301 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 278 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

279 {
280  std::auto_ptr<EcalTPGCrystalStatus> prod(new EcalTPGCrystalStatus());
281  parseTextFile() ;
282  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
283  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
284 
285  EcalTPGCrystalStatusCode badXValue;
286  badXValue.setStatusCode(0);
287  prod->setValue(it->first,badXValue) ;
288  }
289  return prod;
290 
291 }
void setStatusCode(const uint16_t &val)
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
EcalTPGCrystalStatusMap EcalTPGCrystalStatus
std::auto_ptr< EcalTPGFineGrainEBIdMap > EcalTrigPrimESProducer::produceFineGrainEB ( const EcalTPGFineGrainEBIdMapRcd iRecord)

Definition at line 144 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

145 {
146  std::auto_ptr<EcalTPGFineGrainEBIdMap> prod(new EcalTPGFineGrainEBIdMap());
147  parseTextFile() ;
149  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
150  for (it = mapFg_.begin() ; it != mapFg_.end() ; it++) {
151  fg.setValues((it->second)[0], (it->second)[1], (it->second)[2], (it->second)[3], (it->second)[4]) ;
152  prod->setValue(it->first,fg) ;
153  }
154  return prod;
155 }
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_
std::auto_ptr< EcalTPGFineGrainEBGroup > EcalTrigPrimESProducer::produceFineGrainEBGroup ( const EcalTPGFineGrainEBGroupRcd iRecord)

Definition at line 248 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

249 {
250  std::auto_ptr<EcalTPGFineGrainEBGroup> prod(new EcalTPGFineGrainEBGroup());
251  parseTextFile() ;
252  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
253  for (it = mapTower_[0].begin() ; it != mapTower_[0].end() ; it++) {
254  prod->setValue(it->first,(it->second)[1]) ;
255  }
256  return prod;
257 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
std::auto_ptr< EcalTPGFineGrainStripEE > EcalTrigPrimESProducer::produceFineGrainEEstrip ( const EcalTPGFineGrainStripEERcd iRecord)

Definition at line 157 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

158 {
159  std::auto_ptr<EcalTPGFineGrainStripEE> prod(new EcalTPGFineGrainStripEE());
160  parseTextFile() ;
161  // EE Strips
162  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
163  for (it = mapStrip_[1].begin() ; it != mapStrip_[1].end() ; it++) {
165  item.threshold = (it->second)[2] ;
166  item.lut = (it->second)[3] ;
167  prod->setValue(it->first,item) ;
168  }
169  // EB Strips
170  for (it = mapStrip_[0].begin() ; it != mapStrip_[0].end() ; it++) {
172  item.threshold = (it->second)[2] ;
173  item.lut = (it->second)[3] ;
174  prod->setValue(it->first,item) ;
175  }
176  return prod;
177 }
#define begin
Definition: vmac.h:30
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::auto_ptr< EcalTPGFineGrainTowerEE > EcalTrigPrimESProducer::produceFineGrainEEtower ( const EcalTPGFineGrainTowerEERcd iRecord)

Definition at line 179 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

180 {
181  std::auto_ptr<EcalTPGFineGrainTowerEE> prod(new EcalTPGFineGrainTowerEE());
182  parseTextFile() ;
183  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
184  for (it = mapTower_[1].begin() ; it != mapTower_[1].end() ; it++) {
185  prod->setValue(it->first,(it->second)[1]) ;
186  }
187  return prod;
188 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
std::auto_ptr< EcalTPGLinearizationConst > EcalTrigPrimESProducer::produceLinearizationConst ( const EcalTPGLinearizationConstRcd iRecord)

Definition at line 113 of file EcalTrigPrimESProducer.cc.

References mapXtal_, 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().

114 {
115  std::auto_ptr<EcalTPGLinearizationConst> prod(new EcalTPGLinearizationConst());
116  parseTextFile() ;
117  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
118  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
120  item.mult_x12 = (it->second)[1] ;
121  item.mult_x6 = (it->second)[4] ;
122  item.mult_x1 = (it->second)[7] ;
123  item.shift_x12 = (it->second)[2] ;
124  item.shift_x6 = (it->second)[5] ;
125  item.shift_x1 = (it->second)[8] ;
126  prod->setValue(it->first,item) ;
127  }
128  return prod;
129 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
EcalTPGLinearizationConstMap EcalTPGLinearizationConst
std::auto_ptr< EcalTPGLutIdMap > EcalTrigPrimESProducer::produceLUT ( const EcalTPGLutIdMapRcd iRecord)

Definition at line 190 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

191 {
192  std::auto_ptr<EcalTPGLutIdMap> prod(new EcalTPGLutIdMap());
193  parseTextFile() ;
194  EcalTPGLut lut ;
195  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
196  for (it = mapLut_.begin() ; it != mapLut_.end() ; it++) {
197  unsigned int lutArray[1024] ;
198  for (int i=0 ; i <1024 ; i++) lutArray[i] = (it->second)[i] ;
199  lut.setLut(lutArray) ;
200  prod->setValue(it->first,lut) ;
201  }
202  return prod;
203 }
int i
Definition: DBlmapReader.cc:9
void setLut(const unsigned int *lut)
Definition: EcalTPGLut.cc:20
tuple lut
Definition: lumiPlot.py:244
std::map< uint32_t, std::vector< uint32_t > > mapLut_
std::auto_ptr< EcalTPGLutGroup > EcalTrigPrimESProducer::produceLutGroup ( const EcalTPGLutGroupRcd iRecord)

Definition at line 235 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

236 {
237  std::auto_ptr<EcalTPGLutGroup> prod(new EcalTPGLutGroup());
238  parseTextFile() ;
239  for (int subdet=0 ; subdet<2 ; subdet++) {
240  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
241  for (it = mapTower_[subdet].begin() ; it != mapTower_[subdet].end() ; it++) {
242  prod->setValue(it->first,(it->second)[0]) ;
243  }
244  }
245  return prod;
246 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
std::auto_ptr< EcalTPGPedestals > EcalTrigPrimESProducer::producePedestals ( const EcalTPGPedestalsRcd iRecord)

Definition at line 98 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

99 {
100  std::auto_ptr<EcalTPGPedestals> prod(new EcalTPGPedestals());
101  parseTextFile() ;
102  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
103  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
104  EcalTPGPedestal item ;
105  item.mean_x12 = (it->second)[0] ;
106  item.mean_x6 = (it->second)[3] ;
107  item.mean_x1 = (it->second)[6] ;
108  prod->setValue(it->first,item) ;
109  }
110  return prod;
111 }
std::map< uint32_t, std::vector< uint32_t > > mapXtal_
EcalTPGPedestalsMap EcalTPGPedestals
std::auto_ptr< EcalTPGPhysicsConst > EcalTrigPrimESProducer::producePhysicsConst ( const EcalTPGPhysicsConstRcd iRecord)

Definition at line 259 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_, parseTextFile(), parseEventContent::prod, EcalTPGPhysicsConst::Item::ttf_threshold_High, and EcalTPGPhysicsConst::Item::ttf_threshold_Low.

Referenced by EcalTrigPrimESProducer().

260 {
261  std::auto_ptr<EcalTPGPhysicsConst> prod(new EcalTPGPhysicsConst());
262  parseTextFile() ;
263  std::map<uint32_t, std::vector<float> >::const_iterator it ;
264  for (it = mapPhys_.begin() ; it != mapPhys_.end() ; it++) {
266  item.EtSat = (it->second)[0] ;
267  item.ttf_threshold_Low = (it->second)[1] ;
268  item.ttf_threshold_High = (it->second)[2] ;
269  item.FG_lowThreshold = (it->second)[3] ;
270  item.FG_highThreshold = (it->second)[4] ;
271  item.FG_lowRatio = (it->second)[5] ;
272  item.FG_highRatio = (it->second)[6] ;
273  prod->setValue(it->first,item) ;
274  }
275  return prod;
276 }
std::map< uint32_t, std::vector< float > > mapPhys_
std::auto_ptr< EcalTPGSlidingWindow > EcalTrigPrimESProducer::produceSlidingWindow ( const EcalTPGSlidingWindowRcd iRecord)

Definition at line 131 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

132 {
133  std::auto_ptr<EcalTPGSlidingWindow> prod(new EcalTPGSlidingWindow());
134  parseTextFile() ;
135  for (int subdet=0 ; subdet<2 ; subdet++) {
136  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
137  for (it = mapStrip_[subdet].begin() ; it != mapStrip_[subdet].end() ; it++) {
138  prod->setValue(it->first,(it->second)[0]) ;
139  }
140  }
141  return prod;
142 }
#define begin
Definition: vmac.h:30
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::auto_ptr< EcalTPGSpike > EcalTrigPrimESProducer::produceSpike ( const EcalTPGSpikeRcd iRecord)

Definition at line 320 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

321 {
322  std::auto_ptr<EcalTPGSpike> prod(new EcalTPGSpike());
323  parseTextFile();
324  // Only need to do barrel
325  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it;
326  for(it = mapTower_[0].begin(); it != mapTower_[0].end(); ++it)
327  {
328  prod->setValue(it->first, (it->second)[2]);
329  }
330  return prod;
331 }
std::map< uint32_t, std::vector< uint32_t > > mapTower_[2]
#define begin
Definition: vmac.h:30
std::auto_ptr< EcalTPGWeightIdMap > EcalTrigPrimESProducer::produceWeight ( const EcalTPGWeightIdMapRcd iRecord)

Definition at line 205 of file EcalTrigPrimESProducer.cc.

References mapWeight_, parseTextFile(), parseEventContent::prod, EcalTPGWeights::setValues(), and create_public_pileup_plots::weights.

Referenced by EcalTrigPrimESProducer().

206 {
207  std::auto_ptr<EcalTPGWeightIdMap> prod(new EcalTPGWeightIdMap());
208  parseTextFile() ;
210  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
211  for (it = mapWeight_.begin() ; it != mapWeight_.end() ; it++) {
212  weights.setValues((it->second)[0],
213  (it->second)[1],
214  (it->second)[2],
215  (it->second)[3],
216  (it->second)[4]) ;
217  prod->setValue(it->first,weights) ;
218  }
219  return prod;
220 }
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)
std::auto_ptr< EcalTPGWeightGroup > EcalTrigPrimESProducer::produceWeightGroup ( const EcalTPGWeightGroupRcd iRecord)

Definition at line 222 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

223 {
224  std::auto_ptr<EcalTPGWeightGroup> prod(new EcalTPGWeightGroup());
225  parseTextFile() ;
226  for (int subdet=0 ; subdet<2 ; subdet++) {
227  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
228  for (it = mapStrip_[subdet].begin() ; it != mapStrip_[subdet].end() ; it++) {
229  prod->setValue(it->first,(it->second)[1]) ;
230  }
231  }
232  return prod;
233 }
#define begin
Definition: vmac.h:30
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