CommonTools
UtilAlgos
plugins
DoubleProducer.cc
Go to the documentation of this file.
1
/* \class DoubleProducer
2
*
3
* \author Luca Lista, INFN
4
*
5
* $Id: DoubleProducer.cc,v 1.1 2009/03/03 13:07:29 llista Exp $
6
*
7
*/
8
9
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
10
11
class
DoubleProducer
:
public
edm::stream::EDProducer
<> {
12
public
:
13
DoubleProducer
(
const
edm::ParameterSet
&
cfg
);
14
15
private
:
16
void
produce
(
edm::Event
& evt,
const
edm::EventSetup
&)
override
;
17
double
value_
;
18
};
19
20
#include "
FWCore/Framework/interface/Event.h
"
21
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
22
23
using namespace
edm
;
24
using namespace
std
;
25
26
DoubleProducer::DoubleProducer
(
const
ParameterSet
&
cfg
) : value_(
cfg
.getParameter<double>(
"value"
)) {
27
produces<double>();
28
}
29
30
void
DoubleProducer::produce
(
Event
& evt,
const
EventSetup
&) {
31
unique_ptr<double>
value
(
new
double
(
value_
));
32
evt.
put
(
std::move
(
value
));
33
}
34
35
#include "
FWCore/Framework/interface/MakerMacros.h
"
36
37
DEFINE_FWK_MODULE
(
DoubleProducer
);
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:133
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Event.h
MakerMacros.h
std
Definition:
JetResolutionObject.h:76
ParameterSet.h
EDProducer.h
DoubleProducer::value_
double value_
Definition:
DoubleProducer.cc:17
edm::EventSetup
Definition:
EventSetup.h:59
value
Definition:
value.py:1
DoubleProducer::DoubleProducer
DoubleProducer(const edm::ParameterSet &cfg)
Definition:
DoubleProducer.cc:26
looper.cfg
cfg
Definition:
looper.py:296
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
DoubleProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &) override
Definition:
DoubleProducer.cc:30
edm::stream::EDProducer
Definition:
EDProducer.h:36
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSet
Definition:
ParameterSet.h:47
DoubleProducer
Definition:
DoubleProducer.cc:11
edm::Event
Definition:
Event.h:73
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.14