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< 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< 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_
 
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
 
- 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 46 of file EcalTrigPrimESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 62 of file EcalTrigPrimESProducer.cc.

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

62  :
63  dbFilename_(iConfig.getUntrackedParameter<std::string>("DatabaseFile",""))
64 {
65  //the following line is needed to tell the framework what
66  // data is being produced
81  //now do what ever other initialization is needed
82 }
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< EcalTPGLutGroup > produceLutGroup(const EcalTPGLutGroupRcd &)
std::auto_ptr< EcalTPGTowerStatus > produceBadTT(const EcalTPGTowerStatusRcd &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
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 85 of file EcalTrigPrimESProducer.cc.

86 {
87 }

Member Function Documentation

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

Definition at line 442 of file EcalTrigPrimESProducer.cc.

443 {
444  std::vector<int> range ;
445  if (subdet == 0) {
446  // Barrel
447  range.push_back(37) ; // stccNbMin
448  range.push_back(73) ; // tccNbMax
449  range.push_back(1) ; // towerNbMin
450  range.push_back(69) ; // towerNbMax
451  range.push_back(1) ; // stripNbMin
452  range.push_back(6) ; // stripNbMax
453  range.push_back(1) ; // xtalNbMin
454  range.push_back(6) ; // xtalNbMax
455  } else {
456  // Endcap eta >0
457  if (subdet >0 ) {
458  range.push_back(73) ; // tccNbMin
459  range.push_back(109) ; // tccNbMax
460  } else { //endcap eta <0
461  range.push_back(1) ; // tccNbMin
462  range.push_back(37) ; // tccNbMax
463  }
464  range.push_back(1) ; // towerNbMin
465  range.push_back(29) ; // towerNbMax
466  range.push_back(1) ; // stripNbMin
467  range.push_back(6) ; // stripNbMax
468  range.push_back(1) ; // xtalNbMin
469  range.push_back(6) ; // xtalNbMax
470  }
471 
472  if (tccNb>0) {
473  range[0] = tccNb ;
474  range[1] = tccNb+1 ;
475  }
476  if (towerNbInTcc>0) {
477  range[2] = towerNbInTcc ;
478  range[3] = towerNbInTcc+1 ;
479  }
480  if (stripNbInTower>0) {
481  range[4] = stripNbInTower ;
482  range[5] = stripNbInTower+1 ;
483  }
484  if (xtalNbInStrip>0) {
485  range[6] = xtalNbInStrip ;
486  range[7] = xtalNbInStrip+1 ;
487  }
488 
489  return range ;
490 }
void EcalTrigPrimESProducer::parseTextFile ( )
private

Definition at line 302 of file EcalTrigPrimESProducer.cc.

References runTheMatrix::data, dbFilename_, lut2db_cfg::filename, edm::FileInPath::fullPath(), i, EdgesToViz::infile, geometryCSVtoXML::line, mapFg_, mapLut_, mapPhys_, mapStrip_, mapTower_, mapWeight_, mapXtal_, and cmsCodeRules.pickleFileParser::slash.

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

303 {
304  if (mapXtal_.size() != 0) return ; // just parse the file once!
305 
306  uint32_t id ;
307  std::string dataCard ;
308  std::string line;
309  std::ifstream infile ;
310  std::vector<unsigned int> param ;
311  std::vector<float> paramF ;
312  int NBstripparams[2] = {2, 4} ;
313  unsigned int data ;
314  float dataF ;
315 
316  std::string bufString;
317  std::string iString;
318  std::string fString;
319  std::string filename = "SimCalorimetry/EcalTrigPrimProducers/data/"+dbFilename_;
320  std::string finalFileName ;
321  size_t slash=dbFilename_.find("/");
322  if (slash!=0) {
323  edm::FileInPath fileInPath(filename);
324  finalFileName = fileInPath.fullPath() ;
325  }
326  else {
327  finalFileName = dbFilename_.c_str() ;
328  edm::LogWarning("EcalTPG") <<"Couldnt find database file via fileinpath, trying with pathname directly!!";
329  }
330 
331 
332  GzInputStream gis(finalFileName.c_str()) ;
333  while (gis>>dataCard) {
334 
335  if (dataCard == "PHYSICS_EB" || dataCard == "PHYSICS_EE") {
336  gis>>std::dec>>id ;
337  //std::cout<<dataCard<<" "<<std::dec<<id ;
338  paramF.clear() ;
339  for (int i=0 ; i <7 ; i++) {
340  gis>>std::dec>>dataF ;
341  paramF.push_back(dataF) ;
342  //std::cout<<", "<<std::dec<<dataF ;
343  }
344  //std::cout<<std::endl ;
345  mapPhys_[id] = paramF ;
346  }
347 
348  if (dataCard == "CRYSTAL") {
349  gis>>std::dec>>id ;
350  //std::cout<<dataCard<<" "<<std::dec<<id ;
351  param.clear() ;
352  for (int i=0 ; i <9 ; i++) {
353  gis>>std::hex>>data ;
354  //std::cout<<", "<<std::hex<<data ;
355  param.push_back(data) ;
356  }
357  //std::cout<<std::endl ;
358  mapXtal_[id] = param ;
359  }
360 
361  if (dataCard == "STRIP_EB") {
362  gis>>std::dec>>id ;
363  //std::cout<<dataCard<<" "<<std::dec<<id ;
364  param.clear() ;
365  for (int i=0 ; i <NBstripparams[0] ; i++) {
366  gis>>std::hex>>data ;
367  //std::cout<<", "<<std::hex<<data ;
368  param.push_back(data) ;
369  }
370  //std::cout<<std::endl ;
371  mapStrip_[0][id] = param ;
372  }
373 
374  if (dataCard == "STRIP_EE") {
375  gis>>std::dec>>id ;
376  //std::cout<<dataCard<<" "<<std::dec<<id ;
377  param.clear() ;
378  for (int i=0 ; i <NBstripparams[1] ; i++) {
379  gis>>std::hex>>data ;
380  //std::cout<<", "<<std::hex<<data ;
381  param.push_back(data) ;
382  }
383  //std::cout<<std::endl ;
384  mapStrip_[1][id] = param ;
385  }
386 
387  if (dataCard == "TOWER_EB" || dataCard == "TOWER_EE") {
388  gis>>std::dec>>id ;
389  //std::cout<<dataCard<<" "<<std::dec<<id ;
390  param.clear() ;
391  for (int i=0 ; i <2 ; i++) {
392  gis>>std::hex>>data ;
393  //std::cout<<", "<<std::hex<<data ;
394  param.push_back(data) ;
395  }
396  //std::cout<<std::endl ;
397  if (dataCard == "TOWER_EB") mapTower_[0][id] = param ;
398  if (dataCard == "TOWER_EE") mapTower_[1][id] = param ;
399  }
400 
401  if (dataCard == "WEIGHT") {
402  gis>>std::hex>>id ;
403  //std::cout<<dataCard<<" "<<std::dec<<id ;
404  param.clear() ;
405  for (int i=0 ; i <5 ; i++) {
406  gis>>std::hex>>data ;
407  //std::cout<<", "<<std::hex<<data ;
408  param.push_back(data) ;
409  }
410  //std::cout<<std::endl ;
411  mapWeight_[id] = param ;
412  }
413 
414  if (dataCard == "FG") {
415  gis>>std::hex>>id ;
416  //std::cout<<dataCard<<" "<<std::dec<<id ;
417  param.clear() ;
418  for (int i=0 ; i <5 ; i++) {
419  gis>>std::hex>>data ;
420  //std::cout<<", "<<std::hex<<data ;
421  param.push_back(data) ;
422  }
423  //std::cout<<std::endl ;
424  mapFg_[id] = param ;
425  }
426 
427  if (dataCard == "LUT") {
428  gis>>std::hex>>id ;
429  //std::cout<<dataCard<<" "<<std::dec<<id ;
430  param.clear() ;
431  for (int i=0 ; i <1024 ; i++) {
432  gis>>std::hex>>data ;
433  //std::cout<<", "<<std::hex<<data ;
434  param.push_back(data) ;
435  }
436  //std::cout<<std::endl ;
437  mapLut_[id] = param ;
438  }
439  }
440 }
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_
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_
list infile
Definition: EdgesToViz.py:90
tuple filename
Definition: lut2db_cfg.py:20
std::map< uint32_t, std::vector< uint32_t > > mapLut_
std::map< uint32_t, std::vector< uint32_t > > mapStrip_[2]
std::auto_ptr< EcalTPGTowerStatus > EcalTrigPrimESProducer::produceBadTT ( const EcalTPGTowerStatusRcd iRecord)

Definition at line 283 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

284 {
285  std::auto_ptr<EcalTPGTowerStatus> prod(new EcalTPGTowerStatus());
286  parseTextFile() ;
287  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
288  //Barrel
289  for (it = mapTower_[0].begin() ; it != mapTower_[0].end() ; it++) {
290  //set the BadTT status to 0
291  prod->setValue(it->first,0) ;
292  }
293  //Endcap
294  for (it = mapTower_[1].begin() ; it != mapTower_[1].end() ; it++) {
295  //set the BadTT status to 0
296  prod->setValue(it->first,0) ;
297  }
298 
299  return prod;
300 }
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 268 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

269 {
270  std::auto_ptr<EcalTPGCrystalStatus> prod(new EcalTPGCrystalStatus());
271  parseTextFile() ;
272  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
273  for (it = mapXtal_.begin() ; it != mapXtal_.end() ; it++) {
274 
275  EcalTPGCrystalStatusCode badXValue;
276  badXValue.setStatusCode(0);
277  prod->setValue(it->first,badXValue) ;
278  }
279  return prod;
280 
281 }
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 142 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

Referenced by EcalTrigPrimESProducer().

239 {
240  std::auto_ptr<EcalTPGFineGrainEBGroup> prod(new EcalTPGFineGrainEBGroup());
241  parseTextFile() ;
242  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
243  for (it = mapTower_[0].begin() ; it != mapTower_[0].end() ; it++) {
244  prod->setValue(it->first,(it->second)[1]) ;
245  }
246  return prod;
247 }
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 155 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

156 {
157  std::auto_ptr<EcalTPGFineGrainStripEE> prod(new EcalTPGFineGrainStripEE());
158  parseTextFile() ;
159  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
160  for (it = mapStrip_[1].begin() ; it != mapStrip_[1].end() ; it++) {
162  item.threshold = (it->second)[2] ;
163  item.lut = (it->second)[3] ;
164  prod->setValue(it->first,item) ;
165  }
166  return prod;
167 }
#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 169 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

170 {
171  std::auto_ptr<EcalTPGFineGrainTowerEE> prod(new EcalTPGFineGrainTowerEE());
172  parseTextFile() ;
173  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
174  for (it = mapTower_[1].begin() ; it != mapTower_[1].end() ; it++) {
175  prod->setValue(it->first,(it->second)[1]) ;
176  }
177  return prod;
178 }
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 111 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().

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

Definition at line 180 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

181 {
182  std::auto_ptr<EcalTPGLutIdMap> prod(new EcalTPGLutIdMap());
183  parseTextFile() ;
184  EcalTPGLut lut ;
185  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
186  for (it = mapLut_.begin() ; it != mapLut_.end() ; it++) {
187  unsigned int lutArray[1024] ;
188  for (int i=0 ; i <1024 ; i++) lutArray[i] = (it->second)[i] ;
189  lut.setLut(lutArray) ;
190  prod->setValue(it->first,lut) ;
191  }
192  return prod;
193 }
int i
Definition: DBlmapReader.cc:9
void setLut(const unsigned int *lut)
Definition: EcalTPGLut.cc:20
std::map< uint32_t, std::vector< uint32_t > > mapLut_
std::auto_ptr< EcalTPGLutGroup > EcalTrigPrimESProducer::produceLutGroup ( const EcalTPGLutGroupRcd iRecord)

Definition at line 225 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

226 {
227  std::auto_ptr<EcalTPGLutGroup> prod(new EcalTPGLutGroup());
228  parseTextFile() ;
229  for (int subdet=0 ; subdet<2 ; subdet++) {
230  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
231  for (it = mapTower_[subdet].begin() ; it != mapTower_[subdet].end() ; it++) {
232  prod->setValue(it->first,(it->second)[0]) ;
233  }
234  }
235  return prod;
236 }
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 96 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

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

250 {
251  std::auto_ptr<EcalTPGPhysicsConst> prod(new EcalTPGPhysicsConst());
252  parseTextFile() ;
253  std::map<uint32_t, std::vector<float> >::const_iterator it ;
254  for (it = mapPhys_.begin() ; it != mapPhys_.end() ; it++) {
256  item.EtSat = (it->second)[0] ;
257  item.ttf_threshold_Low = (it->second)[1] ;
258  item.ttf_threshold_High = (it->second)[2] ;
259  item.FG_lowThreshold = (it->second)[3] ;
260  item.FG_highThreshold = (it->second)[4] ;
261  item.FG_lowRatio = (it->second)[5] ;
262  item.FG_highRatio = (it->second)[6] ;
263  prod->setValue(it->first,item) ;
264  }
265  return prod;
266 }
std::map< uint32_t, std::vector< float > > mapPhys_
std::auto_ptr< EcalTPGSlidingWindow > EcalTrigPrimESProducer::produceSlidingWindow ( const EcalTPGSlidingWindowRcd iRecord)

Definition at line 129 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

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

Definition at line 195 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

196 {
197  std::auto_ptr<EcalTPGWeightIdMap> prod(new EcalTPGWeightIdMap());
198  parseTextFile() ;
199  EcalTPGWeights weights ;
200  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
201  for (it = mapWeight_.begin() ; it != mapWeight_.end() ; it++) {
202  weights.setValues((it->second)[0],
203  (it->second)[1],
204  (it->second)[2],
205  (it->second)[3],
206  (it->second)[4]) ;
207  prod->setValue(it->first,weights) ;
208  }
209  return prod;
210 }
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 212 of file EcalTrigPrimESProducer.cc.

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

Referenced by EcalTrigPrimESProducer().

213 {
214  std::auto_ptr<EcalTPGWeightGroup> prod(new EcalTPGWeightGroup());
215  parseTextFile() ;
216  for (int subdet=0 ; subdet<2 ; subdet++) {
217  std::map<uint32_t, std::vector<uint32_t> >::const_iterator it ;
218  for (it = mapStrip_[subdet].begin() ; it != mapStrip_[subdet].end() ; it++) {
219  prod->setValue(it->first,(it->second)[1]) ;
220  }
221  }
222  return prod;
223 }
#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 72 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile().

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

Definition at line 77 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceFineGrainEB().

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

Definition at line 78 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceLUT().

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

Definition at line 79 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 76 of file EcalTrigPrimESProducer.h.

Referenced by parseTextFile(), and produceWeight().

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