CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

edm::EDGetToken input_towers_map_
 
std::unique_ptr< HGCalTowerProcessorBasetowersProcess_
 
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 HGCalTowerProducer.cc.

Constructor & Destructor Documentation

HGCalTowerProducer::HGCalTowerProducer ( const edm::ParameterSet conf)

Definition at line 36 of file HGCalTowerProducer.cc.

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

37  : input_towers_map_(consumes<l1t::HGCalTowerMapBxCollection>(conf.getParameter<edm::InputTag>("InputTowerMaps"))) {
38  //setup TowerMap parameters
39  const edm::ParameterSet& towerParamConfig = conf.getParameterSet("ProcessorParameters");
40  const std::string& towerProcessorName = towerParamConfig.getParameter<std::string>("ProcessorName");
42  std::unique_ptr<HGCalTowerProcessorBase>{HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig)};
43 
44  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
45 }
T getParameter(std::string const &) const
edm::EDGetToken input_towers_map_
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
T get(const Candidate &c)
Definition: component.h:55
HGCalTowerProducer::~HGCalTowerProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerProducer.cc.

References beginRun(), and produce().

21 {}

Member Function Documentation

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

Definition at line 47 of file HGCalTowerProducer.cc.

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

Referenced by ~HGCalTowerProducer().

47  {
49  towersProcess_->setGeometry(triggerGeometry_.product());
50 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
void HGCalTowerProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 52 of file HGCalTowerProducer.cc.

References edm::Event::getByToken(), input_towers_map_, eostools::move(), edm::Event::put(), and towersProcess_.

Referenced by ~HGCalTowerProducer().

52  {
53  // Output collections
54  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
55 
56  // Input collections
58 
59  e.getByToken(input_towers_map_, towersMapBxColl);
60 
61  towersProcess_->run(towersMapBxColl, *towers_output, es);
62 
63  e.put(std::move(towers_output), towersProcess_->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
edm::EDGetToken input_towers_map_
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

edm::EDGetToken HGCalTowerProducer::input_towers_map_
private

Definition at line 28 of file HGCalTowerProducer.cc.

Referenced by produce().

std::unique_ptr<HGCalTowerProcessorBase> HGCalTowerProducer::towersProcess_
private

Definition at line 31 of file HGCalTowerProducer.cc.

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

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

Definition at line 29 of file HGCalTowerProducer.cc.

Referenced by beginRun().