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 62 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().

62  :
63  dbFilename_(iConfig.getUntrackedParameter<std::string>("DatabaseFile","")),
64  flagPrint_(iConfig.getParameter<bool>("WriteInFile"))
65 {
66  //the following line is needed to tell the framework what
67  // data is being produced
84  //now do what ever other initialization is needed
85 }
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 88 of file EcalTrigPrimESProducer.cc.

89 {
90 }

Member Function Documentation

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

Definition at line 720 of file EcalTrigPrimESProducer.cc.

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

Definition at line 334 of file EcalTrigPrimESProducer.cc.

References gather_cfg::cout, data, dbFilename_, lut2db_cfg::filename, flagPrint_, edm::FileInPath::fullPath(), i, errorMatrix2Lands_multiChannel::id, EdgesToViz::infile, gen::k, geometryCSVtoXML::line, mapFg_, mapLut_, mapPhys_, mapStrip_, mapTower_, mapWeight_, mapXtal_, and pickleFileParser::slash.

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

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

References parseEventContent::prod.

Referenced by EcalTrigPrimESProducer().

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

Definition at line 302 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 279 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

280 {
281  std::auto_ptr<EcalTPGCrystalStatus> prod(new EcalTPGCrystalStatus());
282  parseTextFile() ;
283  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
284  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
285 
286  EcalTPGCrystalStatusCode badXValue;
287  badXValue.setStatusCode(0);
288  prod->setValue(it->first,badXValue) ;
289  }
290  return prod;
291 
292 }
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 145 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 158 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 180 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

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

Definition at line 191 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

192 {
193  std::auto_ptr<EcalTPGLutIdMap> prod(new EcalTPGLutIdMap());
194  parseTextFile() ;
195  EcalTPGLut lut ;
196  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
197  for (it = mapLut_.begin() ; it != mapLut_.end() ; it++) {
198  unsigned int lutArray[1024] ;
199  for (int i=0 ; i <1024 ; i++) lutArray[i] = (it->second)[i] ;
200  lut.setLut(lutArray) ;
201  prod->setValue(it->first,lut) ;
202  }
203  return prod;
204 }
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 236 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 99 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

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

Definition at line 132 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 321 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 206 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

Referenced by EcalTrigPrimESProducer().

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