Geometry
HGCalCommonData
plugins
FastTimeNumberingInitialization.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: FastTimeNumberingInitialization
4
// Class: FastTimeNumberingInitialization
5
//
14
//
15
// Original Author: Sunanda Banerjee
16
// Created: Tue Mar 21 16:40:29 PDT 2013
17
// $Id: FastTimeNumberingInitialization.cc,v 1.0 2014/04/24 12:47:41 sunanda Exp
18
// $
19
//
20
//
21
22
// user include files
23
#include <
FWCore/Framework/interface/ESProducer.h
>
24
#include <
FWCore/Framework/interface/ModuleFactory.h
>
25
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
26
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
27
28
#include <
DetectorDescription/Core/interface/DDFilter.h
>
29
#include <
DetectorDescription/Core/interface/DDFilteredView.h
>
30
#include <
DetectorDescription/Core/interface/DDsvalues.h
>
31
#include <
Geometry/HGCalCommonData/interface/FastTimeDDDConstants.h
>
32
#include <
Geometry/Records/interface/IdealGeometryRecord.h
>
33
#include "
Geometry/HGCalCommonData/interface/FastTimeParameters.h
"
34
35
//#define EDM_ML_DEBUG
36
37
class
FastTimeNumberingInitialization
:
public
edm::ESProducer
{
38
public
:
39
FastTimeNumberingInitialization
(
const
edm::ParameterSet
&);
40
~FastTimeNumberingInitialization
()
override
;
41
42
using
ReturnType
= std::unique_ptr<FastTimeDDDConstants>;
43
44
ReturnType
produce
(
const
IdealGeometryRecord
&);
45
46
private
:
47
edm::ESGetToken<FastTimeParameters, IdealGeometryRecord>
ftParToken_
;
48
};
49
50
FastTimeNumberingInitialization::FastTimeNumberingInitialization
(
const
edm::ParameterSet
&)
51
: ftParToken_{
setWhatProduced
(
this
).consumes<
FastTimeParameters
>(
edm::ESInputTag
{})} {
52
#ifdef EDM_ML_DEBUG
53
edm::LogVerbatim
(
"HGCalGeom"
) <<
"constructing FastTimeNumberingInitialization"
;
54
#endif
55
}
56
57
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
() {}
58
59
// ------------ method called to produce the data ------------
60
FastTimeNumberingInitialization::ReturnType
FastTimeNumberingInitialization::produce
(
61
const
IdealGeometryRecord
& iRecord) {
62
#ifdef EDM_ML_DEBUG
63
edm::LogVerbatim
(
"HGCalGeom"
) <<
"in FastTimeNumberingInitialization::produce"
;
64
#endif
65
const
auto
& pFTpar = iRecord.
get
(
ftParToken_
);
66
return
std::make_unique<FastTimeDDDConstants>(&pFTpar);
67
}
68
69
// define this as a plug-in
70
DEFINE_FWK_EVENTSETUP_MODULE
(
FastTimeNumberingInitialization
);
edm::ESInputTag
Definition:
ESInputTag.h:87
MessageLogger.h
FastTimeNumberingInitialization::produce
ReturnType produce(const IdealGeometryRecord &)
Definition:
FastTimeNumberingInitialization.cc:60
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:138
ESProducer.h
FastTimeNumberingInitialization::FastTimeNumberingInitialization
FastTimeNumberingInitialization(const edm::ParameterSet &)
Definition:
FastTimeNumberingInitialization.cc:50
DDFilteredView.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:112
FastTimeNumberingInitialization
Definition:
FastTimeNumberingInitialization.cc:37
edm::ParameterSet
Definition:
ParameterSet.h:36
FastTimeDDDConstants.h
DDFilter.h
edm::LogVerbatim
Definition:
MessageLogger.h:297
IdealGeometryRecord.h
FastTimeNumberingInitialization::ftParToken_
edm::ESGetToken< FastTimeParameters, IdealGeometryRecord > ftParToken_
Definition:
FastTimeNumberingInitialization.cc:47
edm::ESGetToken< FastTimeParameters, IdealGeometryRecord >
FastTimeParameters
Definition:
FastTimeParameters.h:9
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
DDsvalues.h
edm::ESProducer
Definition:
ESProducer.h:101
ParameterSet.h
FastTimeNumberingInitialization::ReturnType
std::unique_ptr< FastTimeDDDConstants > ReturnType
Definition:
FastTimeNumberingInitialization.cc:42
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:27
FastTimeParameters.h
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
~FastTimeNumberingInitialization() override
Definition:
FastTimeNumberingInitialization.cc:57
Generated for CMSSW Reference Manual by
1.8.16