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
//
13
//
14
// Original Author: Sunanda Banerjee
15
// Created: Tue Mar 21 16:40:29 PDT 2013
16
// $Id: FastTimeNumberingInitialization.cc,v 1.0 2014/04/24 12:47:41 sunanda Exp $
17
//
18
//
19
20
// system include files
21
#include <memory>
22
23
// user include files
24
#include <
FWCore/Framework/interface/ModuleFactory.h
>
25
#include <
FWCore/Framework/interface/ESProducer.h
>
26
#include <
FWCore/Framework/interface/ESTransientHandle.h
>
27
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
28
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
29
30
#include <
DetectorDescription/Core/interface/DDFilter.h
>
31
#include <
DetectorDescription/Core/interface/DDFilteredView.h
>
32
#include <
DetectorDescription/Core/interface/DDsvalues.h
>
33
#include "
Geometry/HGCalCommonData/interface/FastTimeParameters.h
"
34
#include <
Geometry/HGCalCommonData/interface/FastTimeDDDConstants.h
>
35
#include <
Geometry/Records/interface/IdealGeometryRecord.h
>
36
37
//#define EDM_ML_DEBUG
38
39
class
FastTimeNumberingInitialization
:
public
edm::ESProducer
{
40
41
public
:
42
FastTimeNumberingInitialization
(
const
edm::ParameterSet
&);
43
~FastTimeNumberingInitialization
()
override
;
44
45
typedef
std::shared_ptr<FastTimeDDDConstants>
ReturnType
;
46
47
ReturnType
produce
(
const
IdealGeometryRecord
&);
48
49
private
:
50
FastTimeDDDConstants
*
fastTimeDDDConst_
;
51
};
52
53
FastTimeNumberingInitialization::FastTimeNumberingInitialization
(
const
edm::ParameterSet
&) :
fastTimeDDDConst_
(
nullptr
) {
54
#ifdef EDM_ML_DEBUG
55
std::cout
<<
"constructing FastTimeNumberingInitialization"
<< std::endl;
56
#endif
57
setWhatProduced
(
this
);
58
}
59
60
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
() {}
61
62
63
// ------------ method called to produce the data ------------
64
FastTimeNumberingInitialization::ReturnType
65
FastTimeNumberingInitialization::produce
(
const
IdealGeometryRecord
& iRecord) {
66
#ifdef EDM_ML_DEBUG
67
std::cout
<<
"in FastTimeNumberingInitialization::produce"
<< std::endl;
68
#endif
69
if
(
fastTimeDDDConst_
==
nullptr
) {
70
edm::ESHandle<FastTimeParameters>
pFTpar;
71
iRecord.
get
(pFTpar);
72
fastTimeDDDConst_
=
new
FastTimeDDDConstants
(&(*pFTpar));
73
}
74
return
std::shared_ptr<FastTimeDDDConstants> (
fastTimeDDDConst_
) ;
75
}
76
77
//define this as a plug-in
78
DEFINE_FWK_EVENTSETUP_MODULE
(
FastTimeNumberingInitialization
);
79
MessageLogger.h
nullptr
#define nullptr
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
edm::ESProducer
Definition:
ESProducer.h:97
ParameterSet.h
DDFilteredView.h
edm::ESHandle
Definition:
DTSurvey.h:22
FastTimeNumberingInitialization::produce
ReturnType produce(const IdealGeometryRecord &)
Definition:
FastTimeNumberingInitialization.cc:65
edm::eventsetup::EventSetupRecord::get
void get(HolderT &iHolder) const
Definition:
EventSetupRecord.h:105
FastTimeNumberingInitialization::ReturnType
std::shared_ptr< FastTimeDDDConstants > ReturnType
Definition:
FastTimeNumberingInitialization.cc:45
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:26
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
ESProducer.h
DDsvalues.h
IdealGeometryRecord.h
FastTimeNumberingInitialization::FastTimeNumberingInitialization
FastTimeNumberingInitialization(const edm::ParameterSet &)
Definition:
FastTimeNumberingInitialization.cc:53
FastTimeDDDConstants.h
ESTransientHandle.h
FastTimeDDDConstants
Definition:
FastTimeDDDConstants.h:20
FastTimeNumberingInitialization::fastTimeDDDConst_
FastTimeDDDConstants * fastTimeDDDConst_
Definition:
FastTimeNumberingInitialization.cc:50
FastTimeNumberingInitialization
Definition:
FastTimeNumberingInitialization.cc:39
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
~FastTimeNumberingInitialization() override
Definition:
FastTimeNumberingInitialization.cc:60
gather_cfg.cout
cout
Definition:
gather_cfg.py:143
DDFilter.h
FastTimeParameters.h
Generated for CMSSW Reference Manual by
1.8.11