Main Page
Namespaces
Classes
Package Documentation
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
{
53
#ifdef EDM_ML_DEBUG
54
edm::LogVerbatim
(
"HGCalGeom"
)
55
<<
"constructing FastTimeNumberingInitialization"
;
56
#endif
57
}
58
59
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
() {}
60
61
// ------------ method called to produce the data ------------
62
FastTimeNumberingInitialization::ReturnType
63
FastTimeNumberingInitialization::produce
(
const
IdealGeometryRecord
& iRecord) {
64
#ifdef EDM_ML_DEBUG
65
edm::LogVerbatim
(
"HGCalGeom"
)
66
<<
"in FastTimeNumberingInitialization::produce"
;
67
#endif
68
const
auto
& pFTpar = iRecord.
get
(
ftParToken_
);
69
return
std::make_unique<FastTimeDDDConstants>(&pFTpar);
70
}
71
72
// define this as a plug-in
73
DEFINE_FWK_EVENTSETUP_MODULE
(
FastTimeNumberingInitialization
);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:124
MessageLogger.h
edm::ESInputTag
Definition:
ESInputTag.h:87
FastTimeNumberingInitialization::ReturnType
std::unique_ptr< FastTimeDDDConstants > ReturnType
Definition:
FastTimeNumberingInitialization.cc:42
edm::ESProducer
Definition:
ESProducer.h:99
ParameterSet.h
edm::ESGetToken< FastTimeParameters, IdealGeometryRecord >
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:110
FastTimeNumberingInitialization::produce
ReturnType produce(const IdealGeometryRecord &)
Definition:
FastTimeNumberingInitialization.cc:63
edm::LogVerbatim
Definition:
MessageLogger.h:297
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:27
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
ESProducer.h
DDsvalues.h
IdealGeometryRecord.h
FastTimeNumberingInitialization::ftParToken_
edm::ESGetToken< FastTimeParameters, IdealGeometryRecord > ftParToken_
Definition:
FastTimeNumberingInitialization.cc:47
FastTimeNumberingInitialization::FastTimeNumberingInitialization
FastTimeNumberingInitialization(const edm::ParameterSet &)
Definition:
FastTimeNumberingInitialization.cc:50
FastTimeDDDConstants.h
FastTimeNumberingInitialization
Definition:
FastTimeNumberingInitialization.cc:37
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
~FastTimeNumberingInitialization() override
Definition:
FastTimeNumberingInitialization.cc:59
DDFilter.h
FastTimeParameters.h
DDFilteredView.h
FastTimeParameters
Definition:
FastTimeParameters.h:9
Generated for CMSSW Reference Manual by
1.8.11