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:
42 };
43 
45  : m_label(iConfig.getParameter<std::string>("label")),
46  m_key(iConfig.getParameter<std::string>("key"))
47 
48 {
49  setWhatProduced(this);
50 }
51 
53 {}
54 
57 {
58  LogDebug("Geometry") << "MuonNumberingESProducer::produce from " << m_label << " with " << m_key;
59  auto product = std::make_unique<cms::MuonNumbering>();
60 
62  iRecord.getRecord<DDSpecParRegistryRcd>().get(m_label, registry);
63  auto it = registry->specpars.find(m_key);
64  if(it != end(registry->specpars)) {
65  for(const auto& l : it->second.spars) {
66  if(l.first == "OnlyForMuonNumbering") {
67  for(const auto& k : it->second.numpars) {
68  for(const auto& ik : k.second) {
69  product->put(k.first, static_cast<int>(ik));//values.emplace(k.first, static_cast<int>(ik));
70  }
71  }
72  }
73  }
74  }
75  return product;
76 }
77 
#define LogDebug(id)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< cms::MuonNumbering > ReturnType
MuonNumberingESProducer(const edm::ParameterSet &)
#define end
Definition: vmac.h:39
ReturnType produce(const MuonNumberingRecord &)
int k[5][pyjets_maxn]
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static Interceptor::Registry registry("Interceptor")