CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
unique_ptr< DDCompactView > ReturnType
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
const edm::ESGetToken< DDDetector, IdealMagneticFieldRecord > m_detToken
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const double infinity
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ReturnType produce(const IdealMagneticFieldRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static void fillDescriptions(edm::ConfigurationDescriptions &)
DDCompactViewMFESProducer(const edm::ParameterSet &)