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 hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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 timingPdfMaker::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");
41  towersProcess_ = HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig);
42 
43  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
44 }
T getParameter(std::string const &) const
edm::EDGetToken input_towers_map_
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
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 46 of file HGCalTowerProducer.cc.

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

Referenced by ~HGCalTowerProducer().

46  {
48  towersProcess_->setGeometry(triggerGeometry_.product());
49 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T get() const
Definition: EventSetup.h:73
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 51 of file HGCalTowerProducer.cc.

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

Referenced by ~HGCalTowerProducer().

51  {
52  // Output collections
53  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
54 
55  // Input collections
57 
58  e.getByToken(input_towers_map_, towersMapBxColl);
59 
60  towersProcess_->run(towersMapBxColl, *towers_output, es);
61 
62  e.put(std::move(towers_output), towersProcess_->name());
63 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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().