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 
ConfigurationDescriptions.h
DDVectorRegistryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: DDVectorRegistryESProducer.cc:59
DDVectorRegistryESProducer::DDVectorRegistryESProducer
DDVectorRegistryESProducer(const edm::ParameterSet &)
Definition: DDVectorRegistryESProducer.cc:53
DDVectorRegistryESProducer::~DDVectorRegistryESProducer
~DDVectorRegistryESProducer() override
Definition: DDVectorRegistryESProducer.cc:57
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
ESHandle.h
cms::DDVectorsMap
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double > > DDVectorsMap
Definition: DDNamespace.h:14
edm
HLT enums.
Definition: AlignableModifier.h:19
DDVectorRegistryESProducer::m_token
edm::ESGetToken< DDDetector, IdealGeometryRecord > m_token
Definition: DDVectorRegistryESProducer.cc:50
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
DDVectorRegistryRcd
Definition: DDVectorRegistryRcd.h:8
DDDetector.h
DDVectorRegistryESProducer::ReturnType
unique_ptr< DDVectorRegistry > ReturnType
Definition: DDVectorRegistryESProducer.cc:43
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
DDVectorRegistry.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
IdealGeometryRecord.h
edm::ESGetToken< DDDetector, IdealGeometryRecord >
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DDVectorRegistryESProducer
Definition: DDVectorRegistryESProducer.cc:38
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:101
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
DDVectorRegistryESProducer::produce
ReturnType produce(const DDVectorRegistryRcd &)
Definition: DDVectorRegistryESProducer.cc:64
DDVectorRegistryRcd.h
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21