CMS 3D CMS Logo

MuonNumberingESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetectorDescription/MuonNumberingESProducer
4 // Class: MuonNumberingESProducer
5 //
13 //
14 // Original Author: Ianna Osborne
15 // Created: Tue, 15 Jan 2019 09:10:32 GMT
16 //
17 //
18 
19 #include <memory>
20 
29 
31 public:
33  ~MuonNumberingESProducer() override;
34 
35  using ReturnType = std::unique_ptr<cms::MuonNumbering>;
36 
38 
39 private:
43 };
44 
46  : m_label(iConfig.getParameter<std::string>("label")),
47  m_key(iConfig.getParameter<std::string>("key")),
48  m_token(setWhatProduced(this).consumesFrom<cms::DDSpecParRegistry, DDSpecParRegistryRcd>(
49  edm::ESInputTag("", m_label))) {}
50 
52 
54  LogDebug("Geometry") << "MuonNumberingESProducer::produce from " << m_label << " with " << m_key;
55  auto product = std::make_unique<cms::MuonNumbering>();
56 
57  cms::DDSpecParRegistry const& registry = iRecord.get(m_token);
58  auto it = registry.specpars.find(m_key);
59  if (it != end(registry.specpars)) {
60  for (const auto& l : it->second.spars) {
61  if (l.first == "OnlyForMuonNumbering") {
62  for (const auto& k : it->second.numpars) {
63  for (const auto& ik : k.second) {
64  product->put(k.first, static_cast<int>(ik)); //values.emplace(k.first, static_cast<int>(ik));
65  }
66  }
67  }
68  }
69  }
70  return product;
71 }
72 
DDSpecParRegistryRcd
Definition: DDSpecParRegistryRcd.h:8
MessageLogger.h
ESHandle.h
ESInputTag
edm
HLT enums.
Definition: AlignableModifier.h:19
MuonNumberingESProducer::m_label
const std::string m_label
Definition: MuonNumberingESProducer.cc:40
ESProducer.h
cms::DDSpecParRegistry
Definition: DDSpecParRegistry.h:32
MuonNumberingESProducer::m_key
const std::string m_key
Definition: MuonNumberingESProducer.cc:41
MuonNumberingESProducer
Definition: MuonNumberingESProducer.cc:30
MuonNumberingRecord.h
end
#define end
Definition: vmac.h:39
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDSpecParRegistry.h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
MuonNumberingESProducer::MuonNumberingESProducer
MuonNumberingESProducer(const edm::ParameterSet &)
Definition: MuonNumberingESProducer.cc:45
MuonNumberingESProducer::m_token
const edm::ESGetToken< cms::DDSpecParRegistry, DDSpecParRegistryRcd > m_token
Definition: MuonNumberingESProducer.cc:42
MuonNumberingESProducer::ReturnType
std::unique_ptr< cms::MuonNumbering > ReturnType
Definition: MuonNumberingESProducer.cc:35
edm::ESGetToken< cms::DDSpecParRegistry, DDSpecParRegistryRcd >
DD4hep_MuonNumbering.h
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DDSpecParRegistryRcd.h
MuonNumberingESProducer::produce
ReturnType produce(const MuonNumberingRecord &)
Definition: MuonNumberingESProducer.cc:53
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
cms::DDSpecParRegistry::specpars
DDSpecParMap specpars
Definition: DDSpecParRegistry.h:39
edm::ESProducer
Definition: ESProducer.h:101
MuonNumberingRecord
Definition: MuonNumberingRecord.h:30
MuonNumberingESProducer::~MuonNumberingESProducer
~MuonNumberingESProducer() override
Definition: MuonNumberingESProducer.cc:51
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21