CMS 3D CMS Logo

HGCalConcentratorProducer.cc
Go to the documentation of this file.
3 
10 
13 
15 
16 #include <memory>
17 #include <utility>
18 
20 public:
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
32 
33  std::unique_ptr<HGCalConcentratorProcessorBase> concentratorProcess_;
34 };
35 
37 
39  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
40  input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))),
41  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
42  //setup Concentrator parameters
43  const edm::ParameterSet& concParamConfig = conf.getParameterSet("ProcessorParameters");
44  const std::string& concProcessorName = concParamConfig.getParameter<std::string>("ProcessorName");
45  concentratorProcess_ = std::unique_ptr<HGCalConcentratorProcessorBase>{
46  HGCalConcentratorFactory::get()->create(concProcessorName, concParamConfig)};
47 
48  produces<l1t::HGCalTriggerCellBxCollection>(concentratorProcess_->name());
49  produces<l1t::HGCalTriggerSumsBxCollection>(concentratorProcess_->name());
50 }
51 
54 
56 }
57 
59  // Output collections
60  std::pair<l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection> cc_output;
61 
62  // Input collections
64 
65  e.getByToken(input_cell_, trigCellBxColl);
66  concentratorProcess_->run(trigCellBxColl, cc_output, es);
67  // Put in the event
68  e.put(std::make_unique<l1t::HGCalTriggerCellBxCollection>(std::move(cc_output.first)), concentratorProcess_->name());
69  e.put(std::make_unique<l1t::HGCalTriggerSumsBxCollection>(std::move(cc_output.second)), concentratorProcess_->name());
70 }
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:89281
HGCalConcentratorProducer::input_cell_
edm::EDGetToken input_cell_
Definition: HGCalConcentratorProducer.cc:29
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
HGCalConcentratorProducer::HGCalConcentratorProducer
HGCalConcentratorProducer(const edm::ParameterSet &)
Definition: HGCalConcentratorProducer.cc:38
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalConcentratorProducer
Definition: HGCalConcentratorProducer.cc:19
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:58
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
HGCalConcentratorProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalConcentratorProducer.cc:30
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
edm::EventSetup
Definition: EventSetup.h:58
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord >
HGCalConcentratorProducer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalConcentratorProducer.cc:31
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
HGCalConcentratorProducer::concentratorProcess_
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
Definition: HGCalConcentratorProducer.cc:33
HGCalProcessorBase.h
HGCalConcentratorProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalConcentratorProducer.cc:52
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:22
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:29