L1Trigger
L1THGCal
plugins
HGCalBackendLayer1Producer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
2
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/MakerMacros.h
"
6
7
#include "
DataFormats/L1THGCal/interface/HGCalTriggerCell.h
"
8
#include "
DataFormats/L1THGCal/interface/HGCalTriggerSums.h
"
9
#include "
DataFormats/HGCDigi/interface/HGCDigiCollections.h
"
10
#include "
Geometry/Records/interface/CaloGeometryRecord.h
"
11
#include "
L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h
"
12
13
#include "
L1Trigger/L1THGCal/interface/HGCalProcessorBase.h
"
14
15
#include "
DataFormats/L1THGCal/interface/HGCalCluster.h
"
16
17
#include <memory>
18
19
class
HGCalBackendLayer1Producer
:
public
edm::stream::EDProducer
<> {
20
public
:
21
HGCalBackendLayer1Producer
(
const
edm::ParameterSet
&);
22
~HGCalBackendLayer1Producer
()
override
{}
23
24
void
beginRun
(
const
edm::Run
&,
const
edm::EventSetup
&)
override
;
25
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
26
27
private
:
28
// inputs
29
edm::EDGetToken
input_cell_
,
input_sums_
;
30
edm::ESHandle<HGCalTriggerGeometryBase>
triggerGeometry_
;
31
32
std::unique_ptr<HGCalBackendLayer1ProcessorBase>
backendProcess_
;
33
};
34
35
DEFINE_FWK_MODULE
(
HGCalBackendLayer1Producer
);
36
37
HGCalBackendLayer1Producer::HGCalBackendLayer1Producer
(
const
edm::ParameterSet
& conf)
38
: input_cell_(consumes<
l1t
::
HGCalTriggerCellBxCollection
>(conf.getParameter<
edm
::
InputTag
>(
"InputTriggerCells"
))) {
39
//setup Backend parameters
40
const
edm::ParameterSet
& beParamConfig = conf.
getParameterSet
(
"ProcessorParameters"
);
41
const
std::string
& beProcessorName = beParamConfig.
getParameter
<
std::string
>(
"ProcessorName"
);
42
backendProcess_
= std::unique_ptr<HGCalBackendLayer1ProcessorBase>{
43
HGCalBackendLayer1Factory::get
()->create(beProcessorName, beParamConfig)};
44
45
produces<l1t::HGCalClusterBxCollection>(
backendProcess_
->name());
46
}
47
48
void
HGCalBackendLayer1Producer::beginRun
(
const
edm::Run
&
/*run*/
,
const
edm::EventSetup
& es) {
49
es.
get
<
CaloGeometryRecord
>().
get
(
""
,
triggerGeometry_
);
50
backendProcess_
->setGeometry(
triggerGeometry_
.
product
());
51
}
52
53
void
HGCalBackendLayer1Producer::produce
(
edm::Event
&
e
,
const
edm::EventSetup
& es) {
54
// Output collections
55
auto
be_cluster_output = std::make_unique<l1t::HGCalClusterBxCollection>();
56
57
// Input collections
58
edm::Handle<l1t::HGCalTriggerCellBxCollection>
trigCellBxColl;
59
60
e
.getByToken(
input_cell_
, trigCellBxColl);
61
backendProcess_
->run(trigCellBxColl, *be_cluster_output, es);
62
e
.put(
std::move
(be_cluster_output),
backendProcess_
->name());
63
}
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
HGCalBackendLayer1Producer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition:
HGCalBackendLayer1Producer.cc:48
edm::Run
Definition:
Run.h:45
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
edm
HLT enums.
Definition:
AlignableModifier.h:19
HGCalBackendLayer1Producer::input_sums_
edm::EDGetToken input_sums_
Definition:
HGCalBackendLayer1Producer.cc:29
EDProducer.h
HGCalTriggerSums.h
HGCalBackendLayer1Producer::HGCalBackendLayer1Producer
HGCalBackendLayer1Producer(const edm::ParameterSet &)
Definition:
HGCalBackendLayer1Producer.cc:37
edm::Handle
Definition:
AssociativeIterator.h:50
MakerMacros.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
HGCalTriggerGeometryBase.h
l1t::HGCalTriggerCellBxCollection
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
Definition:
HGCalTriggerCell.h:11
edm::ESHandle< HGCalTriggerGeometryBase >
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition:
HLT_2018_cff.py:79016
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
l1t
delete x;
Definition:
CaloConfig.h:22
HGCDigiCollections.h
edm::stream::EDProducer
Definition:
EDProducer.h:38
HGCalBackendLayer1Producer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition:
HGCalBackendLayer1Producer.cc:30
edm::EventSetup
Definition:
EventSetup.h:57
HGCalCluster.h
edm::EDGetToken
Definition:
EDGetToken.h:35
get
#define get
HGCalBackendLayer1Producer::~HGCalBackendLayer1Producer
~HGCalBackendLayer1Producer() override
Definition:
HGCalBackendLayer1Producer.cc:22
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition:
eostools.py:511
HGCalBackendLayer1Producer
Definition:
HGCalBackendLayer1Producer.cc:19
Frameworkfwd.h
HGCalProcessorBase.h
HGCalBackendLayer1Producer::input_cell_
edm::EDGetToken input_cell_
Definition:
HGCalBackendLayer1Producer.cc:29
HGCalTriggerCell.h
HGCalBackendLayer1Producer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
HGCalBackendLayer1Producer.cc:53
edm::Event
Definition:
Event.h:73
HGCalBackendLayer1Producer::backendProcess_
std::unique_ptr< HGCalBackendLayer1ProcessorBase > backendProcess_
Definition:
HGCalBackendLayer1Producer.cc:32
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition:
ParameterSet.cc:2121
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16