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 
ConfigurationDescriptions.h
ESHandle.h
ESInputTag
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
geometryPPS_CMSxz_fromDD_2016_cfi.DDCompactViewESProducer
DDCompactViewESProducer
Definition: geometryPPS_CMSxz_fromDD_2016_cfi.py:8
DDDetector.h
DDCompactViewESProducer::m_detToken
const edm::ESGetToken< DDDetector, IdealGeometryRecord > m_detToken
Definition: DDCompactViewESProducer.cc:47
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
DDCompactViewESProducer::~DDCompactViewESProducer
~DDCompactViewESProducer() override
Definition: DDCompactViewESProducer.cc:54
DDCompactView.h
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
IdealGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< DDDetector, IdealGeometryRecord >
DDCompactViewESProducer::produce
ReturnType produce(const IdealGeometryRecord &)
Definition: DDCompactViewESProducer.cc:61
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DDCompactViewESProducer::DDCompactViewESProducer
DDCompactViewESProducer(const edm::ParameterSet &)
Definition: DDCompactViewESProducer.cc:50
std
Definition: JetResolutionObject.h:76
DDCompactViewESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: DDCompactViewESProducer.cc:56
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
cms::DDDetector
Definition: DDDetector.h:12
DDCompactViewESProducer::ReturnType
unique_ptr< DDCompactView > ReturnType
Definition: DDCompactViewESProducer.cc:40
edm::ESProducer
Definition: ESProducer.h:104
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
DDCompactViewESProducer
Definition: DDCompactViewESProducer.cc:35
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21