CMS 3D CMS Logo

DDVectorRegistryESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetectorDescription/DDCMS
4 // Class: DDVectorRegistryESProducer
5 //
13 //
14 // Original Author: Ianna Osborne
15 // Created: Fri, 07 Dec 2018 11:20:52 GMT
16 //
17 //
18 
19 #include <memory>
20 
25 
32 #include "DD4hep/Detector.h"
33 
34 using namespace std;
35 using namespace cms;
36 using namespace edm;
37 
39 public:
41  ~DDVectorRegistryESProducer() override;
42 
43  using ReturnType = unique_ptr<DDVectorRegistry>;
44 
46 
47  ReturnType produce(const DDVectorRegistryRcd&);
48 
49 private:
51 };
52 
54  setWhatProduced(this).setConsumes(m_token, edm::ESInputTag("", iConfig.getParameter<string>("appendToDataLabel")));
55 }
56 
58 
61  descriptions.addDefault(desc);
62 }
63 
65  LogDebug("Geometry") << "DDVectorRegistryESProducer::produce\n";
66  const DDVectorsMap& registry = iRecord.get(m_token).vectors();
67 
68  auto product = std::make_unique<DDVectorRegistry>();
69  product->vectors.insert(registry.begin(), registry.end());
70  return product;
71 }
72 
#define LogDebug(id)
T getParameter(std::string const &) const
unique_ptr< DDVectorRegistry > ReturnType
static void fillDescriptions(edm::ConfigurationDescriptions &)
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< DDDetector, IdealGeometryRecord > m_token
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double >> DDVectorsMap
Definition: DDNamespace.h:14
Namespace of DDCMS conversion namespace.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
DDVectorRegistryESProducer(const edm::ParameterSet &)
HLT enums.
ReturnType produce(const DDVectorRegistryRcd &)