CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalConcentratorProducer Class Reference
Inheritance diagram for HGCalConcentratorProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalConcentratorProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HGCalConcentratorProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

std::unique_ptr< HGCalConcentratorProcessorBaseconcentratorProcess_
 
edm::EDGetToken input_cell_
 
edm::EDGetToken input_sums_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecordtriggerGeomToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 20 of file HGCalConcentratorProducer.cc.

Constructor & Destructor Documentation

◆ HGCalConcentratorProducer()

HGCalConcentratorProducer::HGCalConcentratorProducer ( const edm::ParameterSet conf)

Definition at line 39 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
ParameterSet const & getParameterSet(std::string const &) const
#define get
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_

◆ ~HGCalConcentratorProducer()

HGCalConcentratorProducer::~HGCalConcentratorProducer ( )
inlineoverride

Definition at line 23 of file HGCalConcentratorProducer.cc.

23 {}

Member Function Documentation

◆ beginRun()

void HGCalConcentratorProducer::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
override

Definition at line 54 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, edm::EventSetup::getHandle(), edm::ESHandle< T >::product(), triggerGeometry_, and triggerGeomToken_.

54  {
57 }
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_

◆ produce()

void HGCalConcentratorProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 59 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, MillePedeFileConverter_cfg::e, input_cell_, and eostools::move().

59  {
60  // Output collections
61  std::tuple<l1t::HGCalTriggerCellBxCollection, l1t::HGCalTriggerSumsBxCollection, l1t::HGCalConcentratorDataBxCollection>
62  cc_output;
63 
64  // Input collections
66 
67  e.getByToken(input_cell_, trigCellBxColl);
68  concentratorProcess_->run(trigCellBxColl, cc_output);
69  // Put in the event
70  e.put(std::make_unique<l1t::HGCalTriggerCellBxCollection>(std::move(std::get<0>(cc_output))),
71  concentratorProcess_->name());
72  e.put(std::make_unique<l1t::HGCalTriggerSumsBxCollection>(std::move(std::get<1>(cc_output))),
73  concentratorProcess_->name());
74  e.put(std::make_unique<l1t::HGCalConcentratorDataBxCollection>(std::move(std::get<2>(cc_output))),
75  concentratorProcess_->name());
76 }
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ concentratorProcess_

std::unique_ptr<HGCalConcentratorProcessorBase> HGCalConcentratorProducer::concentratorProcess_
private

Definition at line 34 of file HGCalConcentratorProducer.cc.

Referenced by beginRun(), HGCalConcentratorProducer(), and produce().

◆ input_cell_

edm::EDGetToken HGCalConcentratorProducer::input_cell_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

Referenced by produce().

◆ input_sums_

edm::EDGetToken HGCalConcentratorProducer::input_sums_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

◆ triggerGeometry_

edm::ESHandle<HGCalTriggerGeometryBase> HGCalConcentratorProducer::triggerGeometry_
private

Definition at line 31 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

edm::ESGetToken<HGCalTriggerGeometryBase, CaloGeometryRecord> HGCalConcentratorProducer::triggerGeomToken_
private

Definition at line 32 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().