CMS 3D CMS Logo

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

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalTowerMapProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HGCalTowerMapProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

edm::EDGetToken input_cell_
 
std::unique_ptr< HGCalTowerMapProcessorBasetowersMapProcess_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 18 of file HGCalTowerMapProducer.cc.

Constructor & Destructor Documentation

HGCalTowerMapProducer::HGCalTowerMapProducer ( const edm::ParameterSet conf)

Definition at line 36 of file HGCalTowerMapProducer.cc.

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

37  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))) {
38  //setup TowerMap parameters
39  const edm::ParameterSet& towerMapParamConfig = conf.getParameterSet("ProcessorParameters");
40  const std::string& towerMapProcessorName = towerMapParamConfig.getParameter<std::string>("ProcessorName");
41  towersMapProcess_ = std::unique_ptr<HGCalTowerMapProcessorBase>{
42  HGCalTowerMapFactory::get()->create(towerMapProcessorName, towerMapParamConfig)};
43 
44  produces<l1t::HGCalTowerMapBxCollection>(towersMapProcess_->name());
45 }
T getParameter(std::string const &) const
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
ParameterSet const & getParameterSet(std::string const &) const
T get(const Candidate &c)
Definition: component.h:55
HGCalTowerMapProducer::~HGCalTowerMapProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerMapProducer.cc.

References beginRun(), and produce().

21 {}

Member Function Documentation

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

Definition at line 47 of file HGCalTowerMapProducer.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::product(), towersMapProcess_, and triggerGeometry_.

Referenced by ~HGCalTowerMapProducer().

47  {
50 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
void HGCalTowerMapProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 52 of file HGCalTowerMapProducer.cc.

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

Referenced by ~HGCalTowerMapProducer().

52  {
53  // Output collections
54  auto towersMap_output = std::make_unique<l1t::HGCalTowerMapBxCollection>();
55 
56  // Input collections
58 
59  e.getByToken(input_cell_, trigCellBxColl);
60 
61  towersMapProcess_->run(trigCellBxColl, *towersMap_output, es);
62 
63  e.put(std::move(towersMap_output), towersMapProcess_->name());
64 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

edm::EDGetToken HGCalTowerMapProducer::input_cell_
private

Definition at line 28 of file HGCalTowerMapProducer.cc.

Referenced by produce().

std::unique_ptr<HGCalTowerMapProcessorBase> HGCalTowerMapProducer::towersMapProcess_
private

Definition at line 31 of file HGCalTowerMapProducer.cc.

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

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

Definition at line 29 of file HGCalTowerMapProducer.cc.

Referenced by beginRun().