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

Constructor & Destructor Documentation

◆ HGCalTowerProducer()

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

Definition at line 37 of file HGCalTowerProducer.cc.

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

38  : input_towers_map_(consumes<l1t::HGCalTowerMapBxCollection>(conf.getParameter<edm::InputTag>("InputTowerMaps"))),
40  consumes<l1t::HGCalClusterBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
41  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
42  //setup TowerMap parameters
43  const edm::ParameterSet& towerParamConfig = conf.getParameterSet("ProcessorParameters");
44  const std::string& towerProcessorName = towerParamConfig.getParameter<std::string>("ProcessorName");
45  towersProcess_ = HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig);
46 
47  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
48 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetToken input_trigger_cells_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
edm::EDGetToken input_towers_map_
#define get
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_

◆ ~HGCalTowerProducer()

HGCalTowerProducer::~HGCalTowerProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerProducer.cc.

21 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 50 of file HGCalTowerProducer.cc.

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

50  {
52  towersProcess_->setGeometry(triggerGeometry_.product());
53 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T const * product() const
Definition: ESHandle.h:86
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_

◆ produce()

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

Definition at line 55 of file HGCalTowerProducer.cc.

References MillePedeFileConverter_cfg::e, input_towers_map_, input_trigger_cells_, eostools::move(), and towersProcess_.

55  {
56  // Output collections
57  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
58 
59  // Input collections
60  std::pair<edm::Handle<l1t::HGCalTowerMapBxCollection>, edm::Handle<l1t::HGCalClusterBxCollection> > inputsColl;
61  auto& towersMapBxColl = inputsColl.first;
62  auto& clustersBxColl = inputsColl.second;
63 
64  e.getByToken(input_towers_map_, towersMapBxColl);
65  e.getByToken(input_trigger_cells_, clustersBxColl);
66 
67  towersProcess_->run(inputsColl, *towers_output);
68 
69  e.put(std::move(towers_output), towersProcess_->name());
70 }
edm::EDGetToken input_trigger_cells_
edm::EDGetToken input_towers_map_
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ input_towers_map_

edm::EDGetToken HGCalTowerProducer::input_towers_map_
private

Definition at line 28 of file HGCalTowerProducer.cc.

Referenced by produce().

◆ input_trigger_cells_

edm::EDGetToken HGCalTowerProducer::input_trigger_cells_
private

Definition at line 29 of file HGCalTowerProducer.cc.

Referenced by produce().

◆ towersProcess_

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

Definition at line 32 of file HGCalTowerProducer.cc.

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

◆ triggerGeometry_

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

Definition at line 30 of file HGCalTowerProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

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

Definition at line 31 of file HGCalTowerProducer.cc.

Referenced by beginRun().