CMS 3D CMS Logo

DDCompactViewMFESProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DetectorDescription/Core
4 // Class: DDCompactViewMFESProducer
5 //
13 //
14 // Original Author: Ianna Osborne
15 //
16 //
17 
18 #include <memory>
19 
23 
30 #include "DD4hep/Detector.h"
31 
32 using namespace std;
33 using namespace cms;
34 
36 public:
38  ~DDCompactViewMFESProducer() override;
39 
40  using ReturnType = unique_ptr<DDCompactView>;
41 
43 
44  ReturnType produce(const IdealMagneticFieldRecord &);
45 
46 protected:
47  void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
48  const edm::IOVSyncValue &,
49  edm::ValidityInterval &) override;
50 
51 private:
53 };
54 
56  : m_detToken(setWhatProduced(this).consumes<DDDetector>(
57  edm::ESInputTag("", iConfig.getParameter<std::string>("appendToDataLabel")))) {
58  findingRecord<IdealMagneticFieldRecord>();
59 }
60 
62 
65  descriptions.addDefault(desc);
66 }
67 
69  auto product = std::make_unique<DDCompactView>(iRecord.get(m_detToken));
70  return product;
71 }
72 
74  const edm::IOVSyncValue &iosv,
75  edm::ValidityInterval &oValidity) {
77  oValidity = infinity;
78 }
79 
ConfigurationDescriptions.h
DDCompactViewMFESProducer::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition: DDCompactViewMFESProducer.cc:73
DDCompactViewMFESProducer::m_detToken
const edm::ESGetToken< DDDetector, IdealMagneticFieldRecord > m_detToken
Definition: DDCompactViewMFESProducer.cc:52
ESHandle.h
ESInputTag
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ValidityInterval
Definition: ValidityInterval.h:28
ESProducer.h
DDCompactViewMFESProducer::DDCompactViewMFESProducer
DDCompactViewMFESProducer(const edm::ParameterSet &)
Definition: DDCompactViewMFESProducer.cc:55
infinity
const double infinity
Definition: CSCChamberFitter.cc:10
DDDetector.h
edm::EventSetupRecordIntervalFinder
Definition: EventSetupRecordIntervalFinder.h:33
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
DDCompactViewMFESProducer
Definition: DDCompactViewMFESProducer.cc:35
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
volumeBasedMagneticField_dd4hep_160812_cfi.DDCompactViewMFESProducer
DDCompactViewMFESProducer
Definition: volumeBasedMagneticField_dd4hep_160812_cfi.py:20
DDCompactViewMFESProducer::~DDCompactViewMFESProducer
~DDCompactViewMFESProducer() override
Definition: DDCompactViewMFESProducer.cc:61
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
IdealMagneticFieldRecord.h
DDCompactView.h
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
edm::IOVSyncValue
Definition: IOVSyncValue.h:31
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
DDCompactViewMFESProducer::produce
ReturnType produce(const IdealMagneticFieldRecord &)
Definition: DDCompactViewMFESProducer.cc:68
DDCompactViewMFESProducer::ReturnType
unique_ptr< DDCompactView > ReturnType
Definition: DDCompactViewMFESProducer.cc:40
IdealGeometryRecord.h
edm::ESGetToken< DDDetector, IdealMagneticFieldRecord >
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
cms::DDDetector
Definition: DDDetector.h:11
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
edm::ESProducer
Definition: ESProducer.h:101
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
DDCompactViewMFESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: DDCompactViewMFESProducer.cc:63