CMS 3D CMS Logo

HGCalConcentratorProducer.cc
Go to the documentation of this file.
3 
6 
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
31 
32  std::unique_ptr<HGCalConcentratorProcessorBase> concentratorProcess_;
33 };
34 
36 
38  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
39  input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))) {
40  //setup Concentrator parameters
41  const edm::ParameterSet& concParamConfig = conf.getParameterSet("ProcessorParameters");
42  const std::string& concProcessorName = concParamConfig.getParameter<std::string>("ProcessorName");
43  concentratorProcess_ = std::unique_ptr<HGCalConcentratorProcessorBase>{
44  HGCalConcentratorFactory::get()->create(concProcessorName, concParamConfig)};
45 
46  produces<l1t::HGCalTriggerCellBxCollection>(concentratorProcess_->name());
47  produces<l1t::HGCalTriggerSumsBxCollection>(concentratorProcess_->name());
48 }
49 
52 
54 }
55 
57  // Output collections
58  std::pair<l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection> cc_output;
59 
60  // Input collections
62 
63  e.getByToken(input_cell_, trigCellBxColl);
64  concentratorProcess_->run(trigCellBxColl, cc_output, es);
65  // Put in the event
66  e.put(std::make_unique<l1t::HGCalTriggerCellBxCollection>(std::move(cc_output.first)), concentratorProcess_->name());
67  e.put(std::make_unique<l1t::HGCalTriggerSumsBxCollection>(std::move(cc_output.second)), concentratorProcess_->name());
68 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HGCalConcentratorProducer::input_cell_
edm::EDGetToken input_cell_
Definition: HGCalConcentratorProducer.cc:29
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
HGCalConcentratorProducer::HGCalConcentratorProducer
HGCalConcentratorProducer(const edm::ParameterSet &)
Definition: HGCalConcentratorProducer.cc:37
MakerMacros.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
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:56
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
HGCalConcentratorProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalConcentratorProducer.cc:30
l1t
delete x;
Definition: CaloConfig.h:22
HGCDigiCollections.h
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
HGCalConcentratorProducer::concentratorProcess_
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
Definition: HGCalConcentratorProducer.cc:32
HGCalProcessorBase.h
HGCalConcentratorProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalConcentratorProducer.cc:50
HGCalTriggerCell.h
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:2121
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