CMS 3D CMS Logo

HGCalBackendLayer1Producer.cc
Go to the documentation of this file.
3 
7 
13 
15 
17 
18 #include <memory>
19 
21 public:
24 
25  void beginRun(const edm::Run&, const edm::EventSetup&) override;
26  void produce(edm::Event&, const edm::EventSetup&) override;
27 
28 private:
29  // inputs
33 
34  std::unique_ptr<HGCalBackendLayer1ProcessorBase> backendProcess_;
35 };
36 
38 
40  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
41  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
42  //setup Backend parameters
43  const edm::ParameterSet& beParamConfig = conf.getParameterSet("ProcessorParameters");
44  const std::string& beProcessorName = beParamConfig.getParameter<std::string>("ProcessorName");
45  backendProcess_ = std::unique_ptr<HGCalBackendLayer1ProcessorBase>{
46  HGCalBackendLayer1Factory::get()->create(beProcessorName, beParamConfig)};
47 
48  produces<l1t::HGCalClusterBxCollection>(backendProcess_->name());
49 }
50 
54 }
55 
57  // Output collections
58  auto be_cluster_output = std::make_unique<l1t::HGCalClusterBxCollection>();
59 
60  // Input collections
62 
63  e.getByToken(input_cell_, trigCellBxColl);
64  backendProcess_->run(trigCellBxColl, *be_cluster_output, es);
65  e.put(std::move(be_cluster_output), backendProcess_->name());
66 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTriggerGeometryBase
Definition: HGCalTriggerGeometryBase.h:19
HGCalBackendLayer1Producer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalBackendLayer1Producer.cc:51
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
HGCalBackendLayer1Producer::input_sums_
edm::EDGetToken input_sums_
Definition: HGCalBackendLayer1Producer.cc:30
EDProducer.h
HGCalBackendLayer1Producer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalBackendLayer1Producer.cc:32
HGCalTriggerSums.h
HGCalBackendLayer1Producer::HGCalBackendLayer1Producer
HGCalBackendLayer1Producer(const edm::ParameterSet &)
Definition: HGCalBackendLayer1Producer.cc:39
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
MakerMacros.h
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
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Event.h
l1t
delete x;
Definition: CaloConfig.h:22
HGCDigiCollections.h
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
edm::stream::EDProducer
Definition: EDProducer.h:38
HGCalBackendLayer1Producer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalBackendLayer1Producer.cc:31
edm::EventSetup
Definition: EventSetup.h:58
HGCalCluster.h
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord >
HGCalBackendLayer1Producer::~HGCalBackendLayer1Producer
~HGCalBackendLayer1Producer() override
Definition: HGCalBackendLayer1Producer.cc:23
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalBackendLayer1Producer
Definition: HGCalBackendLayer1Producer.cc:20
Frameworkfwd.h
HGCalProcessorBase.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalBackendLayer1Producer::input_cell_
edm::EDGetToken input_cell_
Definition: HGCalBackendLayer1Producer.cc:30
HGCalTriggerCell.h
HGCalBackendLayer1Producer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalBackendLayer1Producer.cc:56
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
HGCalBackendLayer1Producer::backendProcess_
std::unique_ptr< HGCalBackendLayer1ProcessorBase > backendProcess_
Definition: HGCalBackendLayer1Producer.cc:34
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37