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
 
 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< HGCalTowerMapProcessorBasetowersMapProcess_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecordtriggerGeomToken_
 

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::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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet const & getParameterSet(std::string const &) const
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
#define get

◆ ~HGCalTowerMapProducer()

HGCalTowerMapProducer::~HGCalTowerMapProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerMapProducer.cc.

21 {}

Member Function Documentation

◆ beginRun()

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< T >::product(), towersMapProcess_, triggerGeometry_, and triggerGeomToken_.

48  {
51 }
T const * product() const
Definition: ESHandle.h:86
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130

◆ produce()

void HGCalTowerMapProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 53 of file HGCalTowerMapProducer.cc.

References MillePedeFileConverter_cfg::e, input_sums_, eostools::move(), 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 }
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ input_sums_

edm::EDGetToken HGCalTowerMapProducer::input_sums_
private

Definition at line 28 of file HGCalTowerMapProducer.cc.

Referenced by produce().

◆ towersMapProcess_

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

Definition at line 31 of file HGCalTowerMapProducer.cc.

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

◆ triggerGeometry_

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

Definition at line 29 of file HGCalTowerMapProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

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

Definition at line 30 of file HGCalTowerMapProducer.cc.

Referenced by beginRun().