CMS 3D CMS Logo

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