EventFilter
HGCalRawToDigi
plugins
HFNoseRawToDigiFake.cc
Go to the documentation of this file.
1
//STL includes
2
#include <memory>
3
4
//framework includes
5
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
6
#include "
FWCore/Framework/interface/EventSetup.h
"
7
#include "
FWCore/Framework/interface/ESHandle.h
"
8
#include "
FWCore/Framework/interface/global/EDProducer.h
"
9
#include "
FWCore/Framework/interface/Event.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
13
//other includes
14
#include "
DataFormats/HGCDigi/interface/HGCDigiCollections.h
"
15
16
class
HFNoseRawToDigiFake
:
public
edm::global::EDProducer
<> {
17
public
:
18
explicit
HFNoseRawToDigiFake
(
const
edm::ParameterSet
&);
19
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
20
21
private
:
22
void
produce
(
edm::StreamID
,
edm::Event
&,
const
edm::EventSetup
&)
const override
;
23
edm::EDGetTokenT<HGCalDigiCollection>
tok_hfn_
;
24
};
25
26
HFNoseRawToDigiFake::HFNoseRawToDigiFake
(
const
edm::ParameterSet
& iConfig)
27
: tok_hfn_(consumes<
HGCalDigiCollection
>(iConfig.getParameter<
edm
::
InputTag
>(
"hfnoseDigis"
))) {
28
produces<HGCalDigiCollection>(
"HFNose"
);
29
}
30
31
void
HFNoseRawToDigiFake::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{
32
edm::Handle<HGCalDigiCollection>
hfn;
33
iEvent
.getByToken(
tok_hfn_
, hfn);
34
35
auto
out_hfn = std::make_unique<HGCalDigiCollection>();
36
if
(hfn.
isValid
()) {
37
out_hfn = std::make_unique<HGCalDigiCollection>(*(hfn.
product
()));
38
}
39
iEvent
.put(
std::move
(out_hfn),
"HFNose"
);
40
}
41
42
void
HFNoseRawToDigiFake::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
43
edm::ParameterSetDescription
desc
;
44
desc
.add<
edm::InputTag
>(
"hfnoseDigis"
,
edm::InputTag
(
"simHFNoseUnsuppressedDigis:HFNose"
));
45
descriptions.
add
(
"HFNoseRawToDigiFake"
,
desc
);
46
}
47
48
//define this as a plug-in
49
DEFINE_FWK_MODULE
(
HFNoseRawToDigiFake
);
edm::StreamID
Definition:
StreamID.h:30
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
ESHandle.h
HFNoseRawToDigiFake::tok_hfn_
edm::EDGetTokenT< HGCalDigiCollection > tok_hfn_
Definition:
HFNoseRawToDigiFake.cc:23
HFNoseRawToDigiFake::HFNoseRawToDigiFake
HFNoseRawToDigiFake(const edm::ParameterSet &)
Definition:
HFNoseRawToDigiFake.cc:26
edm::EDGetTokenT
Definition:
EDGetToken.h:33
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::SortedCollection
Definition:
SortedCollection.h:49
edm::Handle
Definition:
AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
HFNoseRawToDigiFake::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition:
HFNoseRawToDigiFake.cc:31
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
HFNoseRawToDigiFake::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
HFNoseRawToDigiFake.cc:42
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
HGCDigiCollections.h
edm::EventSetup
Definition:
EventSetup.h:57
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
EventSetup.h
HFNoseRawToDigiFake
Definition:
HFNoseRawToDigiFake.cc:16
ParameterSet.h
EDProducer.h
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:70
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16