Main Page
Namespaces
Classes
Package Documentation
RecoLocalCalo
HcalRecAlgos
plugins
HcalRecAlgoESProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HcalRecAlgoESProducer
4
// Class: HcalRecAlgoESProducer
5
//
13
//
14
// Original Author: Radek Ofierzynski
15
// Created: Mon Feb 9 10:59:46 CET 2009
16
//
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
27
#include "
FWCore/Framework/interface/ESHandle.h
"
28
29
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
30
#include "
RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputer.h
"
31
#include "
RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputerRcd.h
"
32
33
34
35
//
36
// class decleration
37
//
38
39
class
HcalRecAlgoESProducer
:
public
edm::ESProducer
{
40
public
:
41
HcalRecAlgoESProducer
(
const
edm::ParameterSet
&);
42
43
~HcalRecAlgoESProducer
();
44
45
typedef
std::shared_ptr<HcalSeverityLevelComputer>
ReturnType
;
46
47
ReturnType
produce
(
const
HcalSeverityLevelComputerRcd
&);
48
private
:
49
// ----------member data ---------------------------
50
ReturnType
myComputer
;
51
};
52
53
//
54
// constants, enums and typedefs
55
//
56
57
//
58
// static data member definitions
59
//
60
61
//
62
// constructors and destructor
63
//
64
HcalRecAlgoESProducer::HcalRecAlgoESProducer
(
const
edm::ParameterSet
& iConfig)
65
{
66
//the following line is needed to tell the framework what
67
// data is being produced
68
setWhatProduced
(
this
);
69
70
//now do what ever other initialization is needed
71
myComputer
=
ReturnType
(
new
HcalSeverityLevelComputer
(iConfig));
72
}
73
74
75
HcalRecAlgoESProducer::~HcalRecAlgoESProducer
()
76
{
77
78
// do anything here that needs to be done at desctruction time
79
// (e.g. close files, deallocate resources etc.)
80
81
}
82
83
84
//
85
// member functions
86
//
87
88
// ------------ method called to produce the data ------------
89
HcalRecAlgoESProducer::ReturnType
90
HcalRecAlgoESProducer::produce
(
const
HcalSeverityLevelComputerRcd
& iRecord)
91
{
92
using namespace
edm::es
;
93
94
return
myComputer
;
95
}
96
97
//define this as a plug-in
98
DEFINE_FWK_EVENTSETUP_MODULE
(
HcalRecAlgoESProducer
);
HcalRecAlgoESProducer
Definition:
HcalRecAlgoESProducer.cc:39
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
HcalSeverityLevelComputerRcd.h
HcalRecAlgoESProducer::produce
ReturnType produce(const HcalSeverityLevelComputerRcd &)
Definition:
HcalRecAlgoESProducer.cc:90
edm::es
Definition:
es_Label.h:33
HcalRecAlgoESProducer::~HcalRecAlgoESProducer
~HcalRecAlgoESProducer()
Definition:
HcalRecAlgoESProducer.cc:75
ESHandle.h
HcalRecAlgoESProducer::HcalRecAlgoESProducer
HcalRecAlgoESProducer(const edm::ParameterSet &)
Definition:
HcalRecAlgoESProducer.cc:64
HcalSeverityLevelComputer
Definition:
HcalSeverityLevelComputer.h:25
HcalRecAlgoESProducer::ReturnType
std::shared_ptr< HcalSeverityLevelComputer > ReturnType
Definition:
HcalRecAlgoESProducer.cc:45
HcalSeverityLevelComputerRcd
Definition:
HcalSeverityLevelComputerRcd.h:23
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
ESProducer.h
HcalRecAlgoESProducer::myComputer
ReturnType myComputer
Definition:
HcalRecAlgoESProducer.cc:50
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
HcalSeverityLevelComputer.h
Generated for CMSSW Reference Manual by
1.8.11