CMS 3D CMS Logo

HGCalConcentratorProducer.cc
Go to the documentation of this file.
3 
11 
14 
16 
17 #include <memory>
18 #include <utility>
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<HGCalConcentratorProcessorBase> concentratorProcess_;
35 };
36 
38 
40  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
41  input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))),
42  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
43  //setup Concentrator parameters
44  const edm::ParameterSet& concParamConfig = conf.getParameterSet("ProcessorParameters");
45  const std::string& concProcessorName = concParamConfig.getParameter<std::string>("ProcessorName");
46  concentratorProcess_ = std::unique_ptr<HGCalConcentratorProcessorBase>{
47  HGCalConcentratorFactory::get()->create(concProcessorName, concParamConfig)};
48 
49  produces<l1t::HGCalTriggerCellBxCollection>(concentratorProcess_->name());
50  produces<l1t::HGCalTriggerSumsBxCollection>(concentratorProcess_->name());
51  produces<l1t::HGCalConcentratorDataBxCollection>(concentratorProcess_->name());
52 }
53 
56 
58 }
59 
61  // Output collections
62  std::tuple<l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection, l1t::HGCalConcentratorDataBxCollection>
63  cc_output;
64 
65  // Input collections
67 
68  e.getByToken(input_cell_, trigCellBxColl);
69  concentratorProcess_->run(trigCellBxColl, cc_output, es);
70  // Put in the event
71  e.put(std::make_unique<l1t::HGCalTriggerCellBxCollection>(std::move(std::get<0>(cc_output))),
72  concentratorProcess_->name());
73  e.put(std::make_unique<l1t::HGCalTriggerSumsBxCollection>(std::move(std::get<1>(cc_output))),
74  concentratorProcess_->name());
75  e.put(std::make_unique<l1t::HGCalConcentratorDataBxCollection>(std::move(std::get<2>(cc_output))),
76  concentratorProcess_->name());
77 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTriggerGeometryBase
Definition: HGCalTriggerGeometryBase.h:19
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:89301
HGCalConcentratorProducer::input_cell_
edm::EDGetToken input_cell_
Definition: HGCalConcentratorProducer.cc:30
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
HGCalConcentratorProducer::HGCalConcentratorProducer
HGCalConcentratorProducer(const edm::ParameterSet &)
Definition: HGCalConcentratorProducer.cc:39
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalConcentratorProducer
Definition: HGCalConcentratorProducer.cc:20
HGCalTriggerGeometryBase.h
l1t::HGCalTriggerCellBxCollection
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
Definition: HGCalTriggerCell.h:11
edm::ESHandle< HGCalTriggerGeometryBase >
HGCalConcentratorProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalConcentratorProducer.cc:60
CaloGeometryRecord.h
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Event.h
HGCalConcentratorProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalConcentratorProducer.cc:31
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:36
edm::EventSetup
Definition: EventSetup.h:58
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord >
HGCalConcentratorProducer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalConcentratorProducer.cc:32
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
HGCalConcentratorData.h
HGCalConcentratorProducer::concentratorProcess_
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
Definition: HGCalConcentratorProducer.cc:34
HGCalProcessorBase.h
HGCalConcentratorProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalConcentratorProducer.cc:54
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerCell.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
HGCalConcentratorProducer::~HGCalConcentratorProducer
~HGCalConcentratorProducer() override
Definition: HGCalConcentratorProducer.cc:23
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
l1t::HGCalTriggerSumsBxCollection
BXVector< HGCalTriggerSums > HGCalTriggerSumsBxCollection
Definition: HGCalTriggerSums.h:11
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HGCalConcentratorProducer::input_sums_
edm::EDGetToken input_sums_
Definition: HGCalConcentratorProducer.cc:30