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 38 of file HGCalTowerProducer.cc.

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

38  :
39  input_towers_map_(consumes<l1t::HGCalTowerMapBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells")))
40 {
41  //setup TowerMap parameters
42  const edm::ParameterSet& towerParamConfig = conf.getParameterSet("ProcessorParameters");
43  const std::string& towerProcessorName = towerParamConfig.getParameter<std::string>("ProcessorName");
44  HGCalTowerProcessorBase* towerProc = HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig);
45  towersProcess_.reset(towerProc);
46 
47  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
48 }
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 50 of file HGCalTowerProducer.cc.

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

Referenced by ~HGCalTowerProducer().

51  {
53  towersProcess_->setGeometry(triggerGeometry_.product());
54 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
void HGCalTowerProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 56 of file HGCalTowerProducer.cc.

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

Referenced by ~HGCalTowerProducer().

56  {
57 
58  // Output collections
59  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
60 
61  // Input collections
63 
64  e.getByToken(input_towers_map_, towersMapBxColl);
65 
66  towersProcess_->run(towersMapBxColl, *towers_output, es);
67 
68  e.put(std::move(towers_output), towersProcess_->name());
69 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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 29 of file HGCalTowerProducer.cc.

Referenced by produce().

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

Definition at line 32 of file HGCalTowerProducer.cc.

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

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

Definition at line 30 of file HGCalTowerProducer.cc.

Referenced by beginRun().