CMS 3D CMS Logo

DDCompactViewESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetectorDescription/Core
4 // Class: DDCompactViewESProducer
5 //
13 //
14 // Original Author: Ianna Osborne
15 // Created: Wed, 22 May 2019 14:32:49 GMT
16 //
17 //
18 
19 #include <memory>
20 
24 
30 #include "DD4hep/Detector.h"
31 
32 using namespace std;
33 using namespace cms;
34 
36 public:
38  ~DDCompactViewESProducer() override;
39 
40  using ReturnType = unique_ptr<DDCompactView>;
41 
43 
44  ReturnType produce(const IdealGeometryRecord&);
45 
46 private:
48 };
49 
51  : m_detToken(setWhatProduced(this).consumes<DDDetector>(
52  edm::ESInputTag("", iConfig.getParameter<std::string>("appendToDataLabel")))) {}
53 
55 
58  descriptions.addDefault(desc);
59 }
60 
62  auto product = std::make_unique<DDCompactView>(iRecord.get(m_detToken));
63  return product;
64 }
65 
unique_ptr< DDCompactView > ReturnType
const edm::ESGetToken< DDDetector, IdealGeometryRecord > m_detToken
void addDefault(ParameterSetDescription const &psetDescription)
DDCompactViewESProducer(const edm::ParameterSet &)
Namespace of DDCMS conversion namespace.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
HLT enums.
ReturnType produce(const IdealGeometryRecord &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static void fillDescriptions(edm::ConfigurationDescriptions &)