Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
// $Id$
17
//
18
//
19
20
21
// system include files
22
#include <memory>
23
#include "boost/shared_ptr.hpp"
24
25
// user include files
26
#include "
FWCore/Framework/interface/ModuleFactory.h
"
27
#include "
FWCore/Framework/interface/ESProducer.h
"
28
29
#include "
FWCore/Framework/interface/ESHandle.h
"
30
31
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
32
#include "
RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputer.h
"
33
#include "
RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputerRcd.h
"
34
35
36
37
//
38
// class decleration
39
//
40
41
class
HcalRecAlgoESProducer
:
public
edm::ESProducer
{
42
public
:
43
HcalRecAlgoESProducer
(
const
edm::ParameterSet
&);
44
45
~HcalRecAlgoESProducer
();
46
47
typedef
boost::shared_ptr<HcalSeverityLevelComputer>
ReturnType
;
48
49
ReturnType
produce
(
const
HcalSeverityLevelComputerRcd
&);
50
private
:
51
// ----------member data ---------------------------
52
ReturnType
myComputer
;
53
};
54
55
//
56
// constants, enums and typedefs
57
//
58
59
//
60
// static data member definitions
61
//
62
63
//
64
// constructors and destructor
65
//
66
HcalRecAlgoESProducer::HcalRecAlgoESProducer
(
const
edm::ParameterSet
& iConfig)
67
{
68
//the following line is needed to tell the framework what
69
// data is being produced
70
setWhatProduced
(
this
);
71
72
//now do what ever other initialization is needed
73
myComputer
=
ReturnType
(
new
HcalSeverityLevelComputer
(iConfig));
74
}
75
76
77
HcalRecAlgoESProducer::~HcalRecAlgoESProducer
()
78
{
79
80
// do anything here that needs to be done at desctruction time
81
// (e.g. close files, deallocate resources etc.)
82
83
}
84
85
86
//
87
// member functions
88
//
89
90
// ------------ method called to produce the data ------------
91
HcalRecAlgoESProducer::ReturnType
92
HcalRecAlgoESProducer::produce
(
const
HcalSeverityLevelComputerRcd
& iRecord)
93
{
94
using namespace
edm::es;
95
96
return
myComputer
;
97
}
98
99
//define this as a plug-in
100
DEFINE_FWK_EVENTSETUP_MODULE
(
HcalRecAlgoESProducer
);
HcalRecAlgoESProducer::ReturnType
boost::shared_ptr< HcalSeverityLevelComputer > ReturnType
Definition:
HcalRecAlgoESProducer.cc:47
HcalRecAlgoESProducer
Definition:
HcalRecAlgoESProducer.cc:41
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:92
HcalRecAlgoESProducer::~HcalRecAlgoESProducer
~HcalRecAlgoESProducer()
Definition:
HcalRecAlgoESProducer.cc:77
ESHandle.h
HcalRecAlgoESProducer::HcalRecAlgoESProducer
HcalRecAlgoESProducer(const edm::ParameterSet &)
Definition:
HcalRecAlgoESProducer.cc:66
HcalSeverityLevelComputer
Definition:
HcalSeverityLevelComputer.h:25
HcalSeverityLevelComputerRcd
Definition:
HcalSeverityLevelComputerRcd.h:24
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:48
ESProducer.h
HcalRecAlgoESProducer::myComputer
ReturnType myComputer
Definition:
HcalRecAlgoESProducer.cc:52
edm::ParameterSet
Definition:
ParameterSet.h:31
ModuleFactory.h
HcalSeverityLevelComputer.h
Generated for CMSSW Reference Manual by
1.8.5