CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< HGCalConcentratorProcessorBase
concentratorProcess_
 
edm::EDGetToken input_cell_
 
edm::EDGetToken input_sums_
 
edm::ESHandle
< HGCalTriggerGeometryBase
triggerGeometry_
 
edm::ESGetToken
< HGCalTriggerGeometryBase,
CaloGeometryRecord
triggerGeomToken_
 

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

Definition at line 23 of file HGCalConcentratorProducer.cc.

23 {}

Member Function Documentation

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< class >::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:157
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
void HGCalConcentratorProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 59 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, edm::Event::getByToken(), input_cell_, eostools::move(), and edm::Event::put().

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 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
def move
Definition: eostools.py:511

Member Data Documentation

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

Definition at line 34 of file HGCalConcentratorProducer.cc.

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

edm::EDGetToken HGCalConcentratorProducer::input_cell_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalConcentratorProducer::input_sums_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

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

Definition at line 31 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().

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

Definition at line 32 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().