DetectorDescription
DDCMS
plugins
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
21
#include "
FWCore/Framework/interface/ModuleFactory.h
"
22
#include "
FWCore/Framework/interface/ESProducer.h
"
23
#include "
FWCore/Framework/interface/ESHandle.h
"
24
25
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
26
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
27
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
28
#include "
DetectorDescription/DDCMS/interface/DDCompactView.h
"
29
#include "
DetectorDescription/DDCMS/interface/DDDetector.h
"
30
#include "DD4hep/Detector.h"
31
32
using namespace
std
;
33
using namespace
cms
;
34
35
class
DDCompactViewESProducer
:
public
edm::ESProducer
{
36
public
:
37
DDCompactViewESProducer
(
const
edm::ParameterSet
&);
38
~
DDCompactViewESProducer
()
override
;
39
40
using
ReturnType
= unique_ptr<DDCompactView>;
41
42
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
43
44
ReturnType
produce(
const
IdealGeometryRecord
&);
45
46
private
:
47
const
edm::ESGetToken<DDDetector, IdealGeometryRecord>
m_detToken
;
48
};
49
50
DDCompactViewESProducer::DDCompactViewESProducer
(
const
edm::ParameterSet
& iConfig)
51
: m_detToken(setWhatProduced(this).consumes<
DDDetector
>(
52
edm
::
ESInputTag
(
""
, iConfig.getParameter<
std
::
string
>(
"appendToDataLabel"
)))) {}
53
54
DDCompactViewESProducer::~DDCompactViewESProducer
() {}
55
56
void
DDCompactViewESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
57
edm::ParameterSetDescription
desc
;
58
descriptions.
addDefault
(
desc
);
59
}
60
61
DDCompactViewESProducer::ReturnType
DDCompactViewESProducer::produce
(
const
IdealGeometryRecord
& iRecord) {
62
auto
product = std::make_unique<DDCompactView>(iRecord.
get
(
m_detToken
));
63
return
product;
64
}
65
66
DEFINE_FWK_EVENTSETUP_MODULE
(
DDCompactViewESProducer
);
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:103
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
IdealGeometryRecord.h
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
Generated for CMSSW Reference Manual by
1.8.16