Geometry
MuonNumbering
plugins
MuonNumberingInitialization.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: MuonNumberingInitialization
4
// Class: MuonNumberingInitialization
5
//
13
//
14
// Original Author: Michael Case
15
// Created: Thu Sep 28 16:40:29 PDT 2006
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/ESTransientHandle.h
"
24
25
#include "
Geometry/MuonNumbering/interface/MuonDDDConstants.h
"
26
#include "
Geometry/Records/interface/MuonNumberingRecord.h
"
27
28
class
MuonNumberingInitialization
:
public
edm::ESProducer
{
29
public
:
30
MuonNumberingInitialization
(
const
edm::ParameterSet
&);
31
32
using
ReturnType
= std::unique_ptr<MuonDDDConstants>;
33
34
ReturnType
produce
(
const
MuonNumberingRecord
&);
35
36
private
:
37
const
edm::ESGetToken<DDCompactView, IdealGeometryRecord>
geomToken_
;
38
};
39
40
MuonNumberingInitialization::MuonNumberingInitialization
(
const
edm::ParameterSet
&)
41
: geomToken_{
setWhatProduced
(
this
).consumes()} {}
42
43
MuonNumberingInitialization::ReturnType
MuonNumberingInitialization::produce
(
const
MuonNumberingRecord
& iRecord) {
44
edm::ESTransientHandle<DDCompactView>
pDD = iRecord.
getTransientHandle
(
geomToken_
);
45
46
return
std::make_unique<MuonDDDConstants>(*pDD);
47
}
48
49
DEFINE_FWK_EVENTSETUP_MODULE
(
MuonNumberingInitialization
);
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:92
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
ModuleFactory.h
MuonNumberingInitialization::MuonNumberingInitialization
MuonNumberingInitialization(const edm::ParameterSet &)
Definition:
MuonNumberingInitialization.cc:40
MuonNumberingRecord
Definition:
MuonNumberingRecord.h:30
ESProducer.h
edm::ESProducer
Definition:
ESProducer.h:104
MuonNumberingInitialization::geomToken_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > geomToken_
Definition:
MuonNumberingInitialization.cc:37
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
MuonDDDConstants.h
MuonNumberingRecord.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:61
MuonNumberingInitialization::produce
ReturnType produce(const MuonNumberingRecord &)
Definition:
MuonNumberingInitialization.cc:43
MuonNumberingInitialization
Definition:
MuonNumberingInitialization.cc:28
ESTransientHandle.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
MuonNumberingInitialization::ReturnType
std::unique_ptr< MuonDDDConstants > ReturnType
Definition:
MuonNumberingInitialization.cc:32
Generated for CMSSW Reference Manual by
1.8.14