Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
#include <boost/shared_ptr.hpp>
23
24
// user include files
25
#include <
FWCore/Framework/interface/ModuleFactory.h
>
26
#include <
FWCore/Framework/interface/ESProducer.h
>
27
#include <
FWCore/Framework/interface/ESTransientHandle.h
>
28
29
#include <
DetectorDescription/Core/interface/DDFilter.h
>
30
#include <
DetectorDescription/Core/interface/DDFilteredView.h
>
31
#include <
DetectorDescription/Core/interface/DDsvalues.h
>
32
#include <
Geometry/HGCalCommonData/interface/FastTimeDDDConstants.h
>
33
#include <
Geometry/Records/interface/IdealGeometryRecord.h
>
34
35
//#define DebugLog
36
37
class
FastTimeNumberingInitialization
:
public
edm::ESProducer
{
38
39
public
:
40
FastTimeNumberingInitialization
(
const
edm::ParameterSet
&);
41
~FastTimeNumberingInitialization
();
42
43
typedef
std::auto_ptr<FastTimeDDDConstants>
ReturnType
;
44
45
ReturnType
produce
(
const
IdealGeometryRecord
&);
46
47
private
:
48
FastTimeDDDConstants
*
fastTimeDDDConst_
;
49
};
50
51
FastTimeNumberingInitialization::FastTimeNumberingInitialization
(
const
edm::ParameterSet
& iConfig) : fastTimeDDDConst_(0) {
52
#ifdef DebugLog
53
std::cout
<<
"constructing FastTimeNumberingInitialization"
<< std::endl;
54
#endif
55
setWhatProduced
(
this
);
56
}
57
58
59
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
() {}
60
61
62
// ------------ method called to produce the data ------------
63
FastTimeNumberingInitialization::ReturnType
64
FastTimeNumberingInitialization::produce
(
const
IdealGeometryRecord
& iRecord) {
65
#ifdef DebugLog
66
std::cout
<<
"in FastTimeNumberingInitialization::produce"
<< std::endl;
67
#endif
68
if
(
fastTimeDDDConst_
== 0) {
69
edm::ESTransientHandle<DDCompactView>
pDD;
70
iRecord.
get
(pDD);
71
fastTimeDDDConst_
=
new
FastTimeDDDConstants
(*pDD);
72
}
73
return
std::auto_ptr<FastTimeDDDConstants> (
fastTimeDDDConst_
) ;
74
}
75
76
//define this as a plug-in
77
DEFINE_FWK_EVENTSETUP_MODULE
(
FastTimeNumberingInitialization
);
78
FastTimeNumberingInitialization::ReturnType
std::auto_ptr< FastTimeDDDConstants > ReturnType
Definition:
FastTimeNumberingInitialization.cc:43
FastTimeNumberingInitialization::~FastTimeNumberingInitialization
~FastTimeNumberingInitialization()
Definition:
FastTimeNumberingInitialization.cc:59
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
edm::ESProducer
Definition:
ESProducer.h:97
DDFilteredView.h
FastTimeNumberingInitialization::produce
ReturnType produce(const IdealGeometryRecord &)
Definition:
FastTimeNumberingInitialization.cc:64
edm::eventsetup::EventSetupRecord::get
void get(HolderT &iHolder) const
Definition:
EventSetupRecord.h:93
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:51
FastTimeDDDConstants.h
ESTransientHandle.h
FastTimeDDDConstants
Definition:
FastTimeDDDConstants.h:23
FastTimeNumberingInitialization::fastTimeDDDConst_
FastTimeDDDConstants * fastTimeDDDConst_
Definition:
FastTimeNumberingInitialization.cc:48
FastTimeNumberingInitialization
Definition:
FastTimeNumberingInitialization.cc:37
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:145
DDFilter.h
Generated for CMSSW Reference Manual by
1.8.5