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
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
 
 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

edm::EDGetToken input_sums_
 
std::unique_ptr
< HGCalTowerMapProcessorBase
towersMapProcess_
 
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 18 of file HGCalTowerMapProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 36 of file HGCalTowerMapProducer.cc.

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

37  : input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))),
38  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
39  //setup TowerMap parameters
40  const edm::ParameterSet& towerMapParamConfig = conf.getParameterSet("ProcessorParameters");
41  const std::string& towerMapProcessorName = towerMapParamConfig.getParameter<std::string>("ProcessorName");
42  towersMapProcess_ = std::unique_ptr<HGCalTowerMapProcessorBase>{
43  HGCalTowerMapFactory::get()->create(towerMapProcessorName, towerMapParamConfig)};
44 
45  produces<l1t::HGCalTowerMapBxCollection>(towersMapProcess_->name());
46 }
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
HGCalTowerMapProducer::~HGCalTowerMapProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerMapProducer.cc.

21 {}

Member Function Documentation

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

Definition at line 48 of file HGCalTowerMapProducer.cc.

References edm::EventSetup::getHandle(), edm::ESHandle< class >::product(), towersMapProcess_, triggerGeometry_, and triggerGeomToken_.

48  {
51 }
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void HGCalTowerMapProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 53 of file HGCalTowerMapProducer.cc.

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

53  {
54  // Output collections
55  auto towersMap_output = std::make_unique<l1t::HGCalTowerMapBxCollection>();
56 
57  // Input collections
59 
60  e.getByToken(input_sums_, trigSumBxColl);
61 
62  towersMapProcess_->run(trigSumBxColl, *towersMap_output);
63 
64  e.put(std::move(towersMap_output), towersMapProcess_->name());
65 }
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
def move
Definition: eostools.py:511
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_

Member Data Documentation

edm::EDGetToken HGCalTowerMapProducer::input_sums_
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().

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

Definition at line 30 of file HGCalTowerMapProducer.cc.

Referenced by beginRun().