CMS 3D CMS Logo

DDSpecParRegistryESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetectorDescription/DDCMS
4 // Class: DDSpecParRegistryESProducer
5 //
13 //
14 // Original Author: Ianna Osborne
15 // Created: Wed, 09 Jan 2019 16:04:31 GMT
16 //
17 //
18 
19 #include <memory>
20 
24 
31 #include "DD4hep/Detector.h"
32 
33 using namespace std;
34 using namespace cms;
35 
37 public:
39  ~DDSpecParRegistryESProducer() override;
40 
41  using ReturnType = unique_ptr<DDSpecParRegistry>;
42 
44 
45  ReturnType produce(const DDSpecParRegistryRcd&);
46 
47 private:
49 };
50 
52  setWhatProduced(this).setConsumes(m_token,
53  edm::ESInputTag("", iConfig.getParameter<std::string>("appendToDataLabel")));
54 }
55 
57 
60  descriptions.addDefault(desc);
61 }
62 
64  const DDSpecParRegistry& registry = iRecord.get(m_token).specpars();
65  auto product = std::make_unique<DDSpecParRegistry>();
66  product->specpars.insert(registry.specpars.begin(), registry.specpars.end());
67  return product;
68 }
69 
T getParameter(std::string const &) const
edm::ESGetToken< DDDetector, IdealGeometryRecord > m_token
static void fillDescriptions(edm::ConfigurationDescriptions &)
unique_ptr< DDSpecParRegistry > ReturnType
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
DDSpecParRegistryESProducer(const edm::ParameterSet &)
Namespace of DDCMS conversion namespace.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ReturnType produce(const DDSpecParRegistryRcd &)