CMS 3D CMS Logo

EcalElectronicsMappingBuilder.cc
Go to the documentation of this file.
5 
8 
10  : eeToken_{
12 
13 // ------------ method called to produce the data ------------
15  auto prod = std::make_unique<EcalElectronicsMapping>();
16 
17  const auto& item = iRecord.get(eeToken_);
18 
19  const std::vector<EcalMappingElement>& ee = item.endcapItems();
20  FillFromDatabase(ee, *prod);
21  return prod;
22 }
23 
24 void EcalElectronicsMappingBuilder::FillFromDatabase(const std::vector<EcalMappingElement>& ee,
25  EcalElectronicsMapping& theMap) {
26  for (unsigned int i = 0; i < ee.size(); i++) {
27  if (ee[i].electronicsid == 0)
28  continue;
29  if (ee[i].triggerid == 0)
30  continue;
31  theMap.assign(EEDetId::unhashIndex(i).rawId(), ee[i].electronicsid, ee[i].triggerid);
32  }
33  return;
34 }
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalElectronicsId.h
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
EEDetId::unhashIndex
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
EEDetId.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
EcalElectronicsMappingBuilder::EcalElectronicsMappingBuilder
EcalElectronicsMappingBuilder(const edm::ParameterSet &)
Definition: EcalElectronicsMappingBuilder.cc:9
EcalMappingElectronics
EcalMappingElectronicsMap EcalMappingElectronics
Definition: EcalMappingElectronics.h:22
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
edm::ParameterSet
Definition: ParameterSet.h:47
EcalElectronicsMappingBuilder.h
EcalTriggerElectronicsId.h
EcalMappingElectronicsRcd.h
EcalElectronicsMappingBuilder::FillFromDatabase
void FillFromDatabase(const std::vector< EcalMappingElement > &ee, EcalElectronicsMapping &theMap)
Definition: EcalElectronicsMappingBuilder.cc:24
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
EcalElectronicsMappingBuilder::ReturnType
std::unique_ptr< EcalElectronicsMapping > ReturnType
Definition: EcalElectronicsMappingBuilder.h:23
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalElectronicsMappingBuilder::eeToken_
edm::ESGetToken< EcalMappingElectronics, EcalMappingElectronicsRcd > eeToken_
Definition: EcalElectronicsMappingBuilder.h:30
EcalElectronicsMapping::assign
void assign(const DetId &cell, const EcalElectronicsId &, const EcalTriggerElectronicsId &tower)
set the association between a DetId and a tower
Definition: EcalElectronicsMapping.cc:755
EventSetup.h
EcalElectronicsMappingBuilder::produce
ReturnType produce(const EcalMappingRcd &)
Definition: EcalElectronicsMappingBuilder.cc:14
EcalMappingElectronicsRcd
Definition: EcalMappingElectronicsRcd.h:5